[Javascript] Changing 2 attributes onClick
Marcelo Simon
grillo at lazzuri.com.br
Mon May 13 14:32:55 CDT 2002
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/20020513/a7e65303/attachment.htm>
More information about the Javascript
mailing list