Can't get Javascript to change label text
I have tried everything. I simply need some text in a label to change when a user highlights a link. Here is a list of different statements I tried but none of them worked. Please help. Thanks.
hypDataDriller.Attributes.Add("OnMouseOver", getElementById('lbl').InnerHTML='d')
hypDataDriller.Attributes.Add("OnMouseOver", getElementById('lbl').InnerText='d')
hypDataDriller.Attributes.Add("OnMouseOver", getElementById('lbl').Text='d')
hypDataDriller.Attributes.Add("OnMouseOver", getElementById('lbl').Value='d')
Re: Can't get Javascript to change label text
You can't expect those to work because getElementById() would be interpreted as a codebehind function, not a javascript STRING.
Code:
hypDataDriller.Attributes.Add("OnMouseOver", "getElementById('lbl').InnerHTML='d';")