Refer to html controls in Javascript
ASP.NET
3
Posts
2
Posters
0
Views
1
Watching
-
Hi all, How can I refer to my HTML controls declared within tag in javascript? document.frmMain.txtName does not work. Any highlights!!
-
Hi all, How can I refer to my HTML controls declared within tag in javascript? document.frmMain.txtName does not work. Any highlights!!
Does
document.getElementsByTagName["txtName"]
return as object?Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
Does
document.getElementsByTagName["txtName"]
return as object?Vasudevan Deepak Kumar Personal Homepage Tech Gossips
Yes, document.getElementByID("txtName") also returns the object. I have my controls declared in asp:content tag. Does it have anything to do with that? I remove asp:content and put controls in body tag document.frmMain.txtName works.