R
Rob
Hi,
I have a label that I'm trying to make invisible on the client side using
the OnClientClick event for a button.
In the javascript function I have the following code:
var x = getElementById("ctl00_ContentPlaceHolder1_label");
x.Visible = true;
The function is being called correctly, but I can't get getElementId to
return anything other than NULL. We're using AJAX and I've tried calling the
script using label.ClientID from the server side using RegisterStartupScript
in the Page Load event on the server side. But the result is the same. I
checked the ClientID and it's definitely ctl00_ContentPlaceHolder1_label
I've also tried using get$ in place of getElementById, but the result is the
same.
It's not finding ctl00_ContentPlaceHolder1_label, but I don't know what else
it could be. Any advice would be appreciated.
Regards,
I have a label that I'm trying to make invisible on the client side using
the OnClientClick event for a button.
In the javascript function I have the following code:
var x = getElementById("ctl00_ContentPlaceHolder1_label");
x.Visible = true;
The function is being called correctly, but I can't get getElementId to
return anything other than NULL. We're using AJAX and I've tried calling the
script using label.ClientID from the server side using RegisterStartupScript
in the Page Load event on the server side. But the result is the same. I
checked the ClientID and it's definitely ctl00_ContentPlaceHolder1_label
I've also tried using get$ in place of getElementById, but the result is the
same.
It's not finding ctl00_ContentPlaceHolder1_label, but I don't know what else
it could be. Any advice would be appreciated.
Regards,