|
-
Aug 31st, 2006, 04:25 PM
#1
Thread Starter
Lively Member
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')
Last edited by nmaccari; Aug 31st, 2006 at 04:30 PM.
Nick
-
Sep 1st, 2006, 04:53 AM
#2
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';")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|