Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
which ID is used in javascript function
Rameshyadav Medaboina
Jul 16 2016 5:20 PM
290
Reply
In my web page am using 2 radio buttons & 1 button ,,by default both radio buttons are false,,,then am click the button i got one alert message will come i.e please select any one radio button .........
<asp:RadioButton ID="rdb1" runat="server" Text="option1" GroupName="group1" onclick="check();" />
<asp:RadioButton ID="rdb2" runat="server" Text="option2" GroupName="group1" onclick="check();"/> <br />
<asp:Button ID="btn1" runat="server" Text="submit" OnClick="btn1_Click" /><br />
<asp:Label ID="lbl1" runat="server" />
function check()
{
if(document.getElementById("<%=x.ClientID%>").value=="")
{
alert("please select any one button");
return false;
}
else
{
alert("you enetered"+document.getElementById("<%=x.ClientID%>").value)
return true;
}
}
here in this javascript function which ID is used in the place of "x"
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
find datatable columnname by its index in c#
specific column reader file