Multiple events, one HREF...

liunx

Guest
Is there any way to make two different events occur in two different iframes using only one HREF to activate them?<br />
<br />
Thanx.<!--content-->You don't "make two different events occur". <br />
<br />
If you mean two different reactions to an event, the answer is "yes". You can place as many lines of code as necessary in the event handler, just separate each statement with a ";". For example:<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"..." onclick="doThis();doThat();doAnother();return false"><!--content-->Cool.<br />
<br />
So how would I define multiple targets?<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"event1.html" target="area1" "event2.html" target="area2"><br />
<br />
Thanx.<!--content-->I think you are going to have to do something like this:<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"event1.html" onclick="top.area1.location.href=this.href; top.area2.location.href=this.href;"><!--content-->please fill in a little more detail. Im looking to do this too.<!--content-->Ok, to change two frames locations:<br />
<br />
<html><br />
<head><br />
</head><br />
<body><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.yahoo.com" onclick="top.area1.location.href=this.href; top.area2.location.href=this.href; return false;">test</a><br />
</body><br />
</html><br />
Where area1 and area2 are the names of the frames you want to change the location of.<!--content-->
 
Back
Top