Change Two iFrames With One Link

/ Published in: JavaScript
Save to your folder(s)

This simple little snippet will allow you to change two iframes with the click of just one link.

Copy this code and paste it in your HTML
  1. /* JAVASCRIPT CODE IN <head> */
  2. <script language="javascript">
  3. function loadTwo(iframe1URL, iframe2URL)
  4. {
  5. parent.FRAME1.location.href=iframe1URL
  6. parent.FRAME2.location.href=iframe2URL
  7. }
  8. </script>
  11. /* THE LINK CODE */
  12. <a href="javascript:loadTwo('special1.htm','special2.htm')">special link</a>


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.