Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help with Javascript & ClientID issue

Status
Not open for further replies.

nikdiva

Programmer
Jul 27, 2001
17
US
I have a page that has a textbox with a image next to it. When the image is clicked it pops up a calendar that fills in the date in the textbox. This works fine when I open the page initially but when I open the same page with a querystring from another page it doesn't recognize the ClientID for the textbox control anymore. Anybody ever have this problem?
 
In webforms the ID of a textbox is often changed. Do a view source from your browser (or hit f12 to bring up the developers tools and look a script) to find out what it's id actually is.

Often it is something like form1_control_txtMyTextbox

In .net4 webforms does support not renaming the id and leaves the client side instance the same as the server side..

HTH

ROb
 
use this syntax if you are using a framework < 4.0:
var x = getElementById("<%= rblSearchType.clientid %>")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top