Click to See Complete Forum and Search --> : Loading 2 pages in 2 different Iframe's with one Imagelink
Daydreamer
05-01-2003, 10:44 AM
Hi!
I want to have one image link which uses an onemouseover and onmouseout effect to load 2 different pages in 2 different iframe's I've only seen it before once on the entire web, but that script uses normal frames,..
zould someone please please please help me?
im realy kinda deperate..
Greetz Daydreamer
Try something like this:
<a href="#" onmouseover="document.iframe1.src='yourpage.htm';document.iframe2.src='yourpage2.htm';" onmouseout="document.iframe1.src='youroriginalpage.htm';document.iframe2.src='youroriginalpage2.htm';"><img src="yourimg.gif"></a>
Daydreamer
05-01-2003, 11:40 AM
euhmz wow! :) cool thanx for the fast reply! but don't I lose my onmouse over/out effect by using that code?
Greets Daydreamer
Originally posted by Daydreamer
don't I lose my onmouse over/out effect by using that code?Not if you add it back in... ;) if you don't know how, post your rollover code....
Daydreamer
05-01-2003, 11:59 AM
c0ol! :) you rule k, here goed:)
the code for in my head I don't think you'll need that to help me out but just to make sure and since im posting anywayz
<SCRIPT language="JavaScript">
<!-- Begin
function movepic(img_name,img_src) {
document[img_name].src=img_src;
}
// End -->
</SCRIPT>
this is what I use before the <IMG tag the a href thing with javascript;
<A HREF="poetry.html" onmouseover="movepic('poetry','images/poetrydown.gif')"
onmouseout="movepic('poetry','images/poetryout.gif')" target="iframe">
<IMG NAME="poetry" SRC="images/poetry.gif" WIDTH="63" HEIGHT="31" BORDER="0"></A>
uh
:\ okay here's the image code to well anywayz uhm goodluck! I'll kinda worship you and see you as a god if you can achive my goal :D
Friendly Greets Daydreamer
Here ya' go!
<a href="poetry.html" target="iframe" onmouseover="document.iframe1.src='yourpage.htm';document.iframe2.src='yourpage2.htm'; movepic('poetry','images/poetrydown.gif');" onmouseout="document.iframe1.src='youroriginalpage.htm';document.iframe2.src='youroriginalpage2.htm'; movepic('poetry','images/poetryout.gif');"><img name="poetry" src="images/poetry.gif" name="poetry" width="63" height="31" border="0"></a>
Daydreamer
05-02-2003, 04:39 AM
Thank You! :)
you're a great help!
but uhm don't I miss the Target="" for the second link to be openen in my second Iframe witch I named; "Tagframe"
the first is simply called Iframe
Friendly Greets Daydreamer!
Originally posted by Daydreamer
but uhm don't I miss the Target="" for the second link to be openen in my second Iframe witch I named; "Tagframe"
the first is simply called IframeI don't understand what you need. Could you explain? Do you need both iframes to change when you click the link? If so, are they the same or different urls as the mouseover links?
Daydreamer
05-02-2003, 07:02 AM
Hi!
Im sorry if I was a little unclear about what exactly it is I need well I'll try to explain it;
I have an normal image, Poetry.gif when you go over the image poetrydown.gif should apear, when you move off the image again you should get poetryout.gif when I click the image I need it to open 2 diffent pages, poetry.html and poems.html. poetry.html should be opened in the iframe called; "iframe" so the target for that link should be Iframe I suppose, and the other page Poems.html should be opened in an other iframe on the same page called; "tagframe" I hope I made myself a little more understandable :)
thanks!
Friendly Greets,
Daydreamer
Try this one: ;)
<a href="poetry.html" target="iframe" onmouseover="movepic('poetry','images/poetrydown.gif');" onmouseout="movepic('poetry','images/poetryout.gif');" onclick="document.iframe1.src='yourpage.htm';document.iframe2.src='yourpage2.htm; return false;"><img name="poetry" src="images/poetry.gif" name="poetry" width="63" height="31" border="0"></a>
Daydreamer
05-03-2003, 04:26 AM
Cool! uhmz nice job I must say :) with that code the onmouse over and onmouse out works fine again which it didn't with the previous code but it still doens't load the yourpage2.html in my second iframe :( named;"Tagframe" but there is still only one target used in the code maybe thats the problem? this is what your script doens fine at the moment;
when openening the page the poetry.gif image appear, when going over it poetrydown.gif appears when going off it poetryout.gif appears so thats perfect :) when you click it yourpage1.htm openen in the iframe; Iframe. but the second iframe; Tagframe, doens't change :(
if you want to give-up because im to naggy I'll understand..
Thanks anyway! :) your time is already worth more of a thanks that a few words can represent :)
Friendly Greets Daydreamer