homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Two iFrame windows at the same time
target two iframe windows at the same time with a rollover button

 11:54 pm on Sep 11, 2010 (gmt 0)

I am having trouble I can target two iframe windows at the same time using a Text Link, However I have not found a way to do this using a roll over image. Here is the Two codes I know. Can anyone help me please....

(roll over image) In the <head>

<!-- Begin
loadImage1 = new Image();
loadImage1.src = "http://www.midwestfishing.org/pics/01_info_blue.gif";
staticImage1 = new Image();
staticImage1.src = "http://www.midwestfishing.org/pics/01_info_black.gif";

<a href="info.html" target="frame1" onMouseOver="image1.src=loadImage1.src;" onMouseOut="image1.src=staticImage1.src;">
<img name="image1" src="http://www.midwestfishing.org/pics/01_info_black.gif" border=0></a>

(two frames at once text) In the <head>

<script language="javascript">
function loadTwo(iframe1URL, iframe2URL)

<a href="javascript:loadTwo('info.html','home.html')">info</a>




 1:43 am on Sep 13, 2010 (gmt 0)

Isn't it just a matter of calling loadTwo in your onMouseOver and onMouseOut?

onMouseOver="image1.src=loadImage1.src;loadTwo('URL1','URLL2')" onMouseOut="image1.src=staticImage1.src;loadTwo('URL1','URLL2')"


 1:22 am on Sep 14, 2010 (gmt 0)

I am still having problems...

I just cant seem to get this to work corectly?

I donít have a problem getting the roll over images to work at all but I am still having the problem of targeting two Iframes at once. Basically I have two Iframe windows on my home page one for a list of buttons and one that displays the main content of the site. If I were to click say the camping rollover image it needs to pull the mail camping html page into frame 1 well bringing up a list of categories in frame 2 at the same time. I canít seem to get this to work. I am more familiar with Networking and hardware support than I am programming and JavaScript is my least favorite.


 11:42 pm on Sep 14, 2010 (gmt 0)

Post snippets of your code so far, and describe what you are seeing in the way of behavior and/or errors.


 10:51 pm on Sep 18, 2010 (gmt 0)

Yea that doesn't seem to be working for me. Here is what I am trying to accomplish I have the following two button images witch I want to roll over and when clicked upon I not only want the image to stay gold so that each button acts as a book marker but I also want two iframes on one page to load content into them at the same time. here are my image names: 01_home_black.gif and 01_home_gold.gif also the name of the two web-pages (content) i want to display into my iframes one and two, home.html and buttons.html



If you can help me out I would appreciate it greatly, can you be more specific also to what goes were I am really new to all this

I have been trying all difrent methods from lots of people like this without any luck:

<script language="javascript">
function loadTwo(id, src, iframe1URL, iframe2URL)
document.getElementById(id).src = src;

if (!iframe1URL && !iframe2URL)

<a href="#" onclick="loadTwo('Page1.htm','Page2.htm');">info</a>
<br />
<img src="img1.jpg" width="100" height="100" id="img1" onmouseover="loadTwo('img1', 'img2.jpg', 'Page1.htm','Page2.htm');" onmouseout="loadTwo('img1', 'img1.jpg', 'Default1.htm','Default2.htm');">
<br />
<iframe src="Default1.htm" name="frame1" width="100%" height="300"></iframe>
<iframe src="Default2.htm" name="frame2" width="100%" height="300"></iframe>

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved