Friday, 27 December 2013

How do I update two frames at once?

Using JavaScript :

Using the scripting language JavaScript, a small script can be written to update two frames at once. It would lookb basically as follows:

<SCRIPT LANGUAGE=JAVASCRIPT>
<!--
function fnUpdate(){
   top.frame1.location="URL1";
   top.frame2.location="URL2";
}
// -->
</SCRIPT>
...

<A HREF="URL1" TARGET=frame1 onClick="fnUpdate();">Update frames</A>
 
The names frame1 and frame2 would have to be replaced with the names of the actual frames you want to have updated. Using the link above, if the browser does not support Javascript (or has it disabled), only the first frame will be updated.

 Source : http://www.stack.nl/htmlhelp/design/frames/faq/faq.html

No comments:

Post a Comment