.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Steve Jackman
Imran Ghani
Santhakumar Munuswamy

Home >> Forum >> JavaScript/VBScript >> Post New QuestionBookmark and Share Subscribe to Forum

checkbox id in JavaScript

Posted By: jay     Posted Date: May 06, 2010    Points:2   Category :JavaScript/VBScript
hi how to store a id of checkbox in a variable using getElementByName()

Responses
Author: Lakhan Pal Garg             
Posted Date: May 06, 2010     Points: 5   

Hi Jay-

var chkID;


chkID=document.getElementById("<%=CheckBox1.ClientID %>");

Write this line whereever (Event) you want to get the CheckBox ID.

Thanks & Regards
Lakhan Pal Garg

Author: Lalij Mer             
Posted Date: May 10, 2010     Points: 5   

check this lnk

http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_22101148.html

Please Check my answer if you help....
Thank You...

Lalit.
Author: BangaruBabuPureti             
Posted Date: May 13, 2010     Points: 5   

function GetCheckBoxValue(id)

{

alert(document.getElementById(id).checked);

}


<td>
<input type="button" value="Submit" onclick="GetCheckBoxValue('<%= checkBox1.ClientID %>')" />
</td>


BangaruBabu Pureti
http://bangarubabupureti.spaces.live.com/


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend