Two frame changes with one link?

Results 1 to 2 of 2

Thread: Two frame changes with one link?

  1. #1
    Join Date
    Dec 1969

    Default Two frame changes with one link?

    I have a site in frames.<BR><BR>Here is the structure:<BR><BR>target="left" (left frame, left.html)<BR>target="top" (top frame, top.html)<BR>target="main" (main frame, main.html)<BR><BR>I would like to change both the contents of the top.html and main.html with one link. I have tried creating a new directory with new contents for top.html & main.html but I am unable still to have both top and main change at the same time.<BR><BR>Any suggestions? All advice is appreciated:)

  2. #2
    Join Date
    Dec 1969

    Default needs client-side JavaScript

    &#060;script language="JavaScript"&#062;<BR>function changeTwoPages(href1, target1, href2, target2)<BR>{<BR> ef = href1<BR>window.parent.target2.location.href = href2<BR>}<BR>&#060;/script&#062;<BR><BR>target1 and target2 are the frame names where the page change should occur. href1 and href2 are the URLs to go in the target frames.<BR><BR>Then, in your link put:<BR><BR>&#060;a href="#" onClick="changeTwoPages(&#039;;, top, &#039;;, left)"&#062;Swap two pages!&#060;/a&#062;<BR><BR>NOT guaranteed but it is somewhere close. Surely you can fiddle it to work?!!<BR><BR>Hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts