display javascript value on a label
-
hi all i'm doing a mantanence project. In that some code i write in javascript in html page. Is it possible to display a variablr value on label when we run the application. If so, then how can it be done
You give the label an ID. And in javascript use the document.GetElementByID(id) and set the value attribute. Hope it helps.
There are 10 kinds of people: those who understand binary and those who don't
-
hi all i'm doing a mantanence project. In that some code i write in javascript in html page. Is it possible to display a variablr value on label when we run the application. If so, then how can it be done
if by label you mean an ASP.NET control, the wrinkle is that the ClientID is not the ID you set, so you need to find the client Id for getElementByName
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
hi all i'm doing a mantanence project. In that some code i write in javascript in html page. Is it possible to display a variablr value on label when we run the application. If so, then how can it be done
P_Elza wrote:
label
asp:Label is rendered as a SPAN. You can access the span in JavaScript using
document.getElementById("spanid");
Vasudevan Deepak Kumar Personal Homepage Tech Gossips