Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for .NET
»
change CommandButton img in javascript???
change CommandButton img in javascript???
Last post 06-02-2005, 2:02 PM by
aaauuummmm
. 1 replies.
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
06-01-2005, 9:52 PM
7167
aaauuummmm
Joined on 04-30-2005
Posts 12
change CommandButton img in javascript???
Reply
Quote
I'm using CreateCommandButton, but want to dynamically change the underlying img in javascript without having to do a call back to the server and reconstructing the button.
How???
06-02-2005, 2:02 PM
7184
in reply to
7167
aaauuummmm
Joined on 04-30-2005
Posts 12
Re: change CommandButton img in javascript???
Reply
Quote
No worries. I figured it out. I created two command buttons and then wrote javascript to hide one or the other depending on the state. The only trick was recognizing that the cute software will prepend a "cmd_" to the ID of the img tag of the command button.
In short, the javascript to hide a button looks something like...
document.findElementById('cmd_MyButtonCommand').style.display='none';
and to restore
document.findElementById('cmd_MyButtonCommand').style.display='';
Is there a better way?