Hey everyone.
I have a page that worked great before I updated it to a masterpage based page...
My problem is this -
I have a label that I hide - ID =lblAlert Visible = false
Theres also a dropdown list right next to it. (called DDL_Term)
Thanks to some very cool people here on EE, I had a small line of javascript added to the dropdown so that if a user changes the drop down, the label becomes visible, without needing a full postback.
This javascirpt attaches to the drop down with the following command:
DDL_Term.Attributes.Add("o
nchange", "lblAlert.style.visiblity=
'visible';
")
The trouble is, now that this is in a master page, my alert label doesn't have an ID=lblAlert,
now it's something like _ctl0_contentPlaceHolder1_
lblAlert
I can certainly hard code this, but is there a way to get the system to use the correct value?
that way if this page ends up in a different contentPlaceHolder someday, I won't have to come back and re-code?
(I tried DDL_Term.Attributes.Add("o
nchange", lblalert.ID & ".style.visiblity='visible
';") but that appears to = lblalert, not _ctl0_contentplaceholder1_
lblalert
thanks in advance!
- Jack
Start Free Trial