Multiple Links :
THE CODE
-  
- Send Page To Friend 








Assuming you want a link to open Yahoo in a frame called bannerframe and AltaVista in a frame called mainframe the code looks like this:

<a href="#" onClick="
parent.bannerframe.location='http://www.Yahoo.com';
parent.mainframe.location='http://www.altavista.com';
return false;
">


As you can see, we simply add a:

parent.framename.location='linkname';

for each page we want to open. You can, of course, add as many links as you like.


NOTE:
The onClick event is enclosed by double quotes.
The javascript links are enclosed by single quotes.


The return false statement makes sure that the browser doesn't even try to interpret the html link (pointing to #).
This is necessary because sometimes a link to an unexisting anchor forces the browser to go to the top of the page (which might not be what we want).

 << PREVIOUS
READ MORE >>  







Got unanswered questions related to this page?

Visit the Talk Back Page and post your questions!







DEVELOPER TIP!





     "Better Than Books - As Easy As It Gets!"