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

msg:4200666 | 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> <SCRIPT LANGUAGE="JavaScript"> <!-- 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"; ........................................................... (button) <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) { parent.frame1.location.href=iframe1URL parent.frame2.location.href=iframe2URL } </script> ........................................................... (button) <a href="javascript:loadTwo('info.html','home.html')">info</a> Thanks!
|
Dijkgraaf

msg:4200970 | 1:43 am on Sep 13, 2010 (gmt 0) | Isn't it just a matter of calling loadTwo in your onMouseOver and onMouseOut? e.g. onMouseOver="image1.src=loadImage1.src;loadTwo('URL1','URLL2')" onMouseOut="image1.src=staticImage1.src;loadTwo('URL1','URLL2')"
|
itbasolo

msg:4201463 | 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.
|
Dijkgraaf

msg:4201865 | 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.
|
itbasolo

msg:4203730 | 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 [midwestfishing.org...] [midwestfishing.org...] 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.frame1.location.href=iframe1URL; document.frame2.location.href=iframe2URL; document.getElementById(id).src = src; if (!iframe1URL && !iframe2URL) { document.frame1.location.href="Default1.htm"; document.frame2.location.href="Default2.htm"; } } </script> <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> <br> <iframe src="Default2.htm" name="frame2" width="100%" height="300"></iframe>
|
|
|