problem to Show "Sending ..." for OnClientClick in my button.
-
hi i write this JavaScript Code for change Text of my label : Function lbl_Waint() { document.getElementById("lbl_status").setAttribute("Text","Sending ..."); } and in OnClientClick of my button write this code : OnClientClick="lbl_Waint();true" but it doesn't work, how to solve my prblem ? thanks
-
hi i write this JavaScript Code for change Text of my label : Function lbl_Waint() { document.getElementById("lbl_status").setAttribute("Text","Sending ..."); } and in OnClientClick of my button write this code : OnClientClick="lbl_Waint();true" but it doesn't work, how to solve my prblem ? thanks
You are confusing the server control with the html elements that it renders. A label will be rendered as a span tag, and a span tag has no Text attribute. Use the innerHTML property of the element to change it's text.
--- single minded; short sighted; long gone;
-
You are confusing the server control with the html elements that it renders. A label will be rendered as a span tag, and a span tag has no Text attribute. Use the innerHTML property of the element to change it's text.
--- single minded; short sighted; long gone;
-
thanks for reply, i change my code by your suggestion as follow :
document.getElementById("lbl_status").innerHTML = str;
but does't worked again.plz write full example of this problem,thanksStandard question #1: What do you mean by "not working"? Standard question #2: What error message do you get? Full example:
document.getElementById('lbl_status').innerHTML = 'Sending...';
Have you verified that the id of the generated element is correct?--- single minded; short sighted; long gone;
-
Standard question #1: What do you mean by "not working"? Standard question #2: What error message do you get? Full example:
document.getElementById('lbl_status').innerHTML = 'Sending...';
Have you verified that the id of the generated element is correct?--- single minded; short sighted; long gone;
I think, lbl_status is server control. So, Try the following way
document.getElementById('<%= lbl_status.ClientID.ToString() %>').innerHTML = 'Sending...';
Regards R.Arockiapathinathan