[Javascript] Changing 2 attributes onClick
Marcelo Simon
grillo at lazzuri.com.br
Tue May 14 02:13:41 CDT 2002
thanks Trey and Murugan.
I've done what you said ( adding an extra =, and changig set to var ) an it didn't work either. So I went to flash and did it there :)
Marcelo Simon
----- Original Message -----
From: Marcelo Simon
To: javascript at LaTech.edu
Sent: Monday, May 13, 2002 4:32 PM
Subject: [Javascript] Changing 2 attributes onClick
Hi, I'm trying to change 2 attributes of 2 diferent tags when I click on an image. I've came with this code:
<td><a name="blahref" id="blahref" href="i_emoticons.cfm" target="blahbox"><img src="images/bt_emoticons.gif" name="blahicon" id="blahicon" width="18" height="16" border="0" onClick="blahbutton();"></a></td>
and the blahbutton functions as this:
function blahbutton() {
if (action='icon') {
set action='box';
document.blahicon.src ='images/bt_blahbox.gif';
document.blahref.href ='i_blahbox.cfm';
}
if (action='box') {
set action ='icon';
document.blahicon.src ='images/bt_emoticons.gif';
document.blahref.href ='i_emoticons.cfm';
}
}
can someone point me out why this isn't working? it's for IE only.
TIA
Marcelo Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20020514/24cad396/attachment.htm>
More information about the Javascript
mailing list