Odd clientID behaviour

J

John

Hi all,

I have a user control which I need tor eference in a javascript function on
the client. What I do is to sedn the name of that control down to the client
in a variable and the javascript function uses that variable to get the
element.

Now in my Page_Load event, I get the clientID of the control (an image
control) and put this into a variable. The value of this in debug is
"_ctl3_UCNutrients_imgNutritional". The javascript is not finding the
element because if I view the source, the value is rendered as
"_ctl4_UCNutrients_imgNutritional". Whay is this happening? How do I fix it?

Regards
John.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top