PDA

View Full Version : iframes + JS = ???



M rosi
02-27-2011, 04:52 AM
hello js people,
i need your help please.
my problem is i have 2 different parent pages (index.html & other.html) with it's own iframes(iframe _1.html & iframe _2.html) .

index.html ------> iframe _1.html
other.html ------> iframe _2.html

when i click link on the "index.html" (not on iframe _1.html but on index.html ), it should go to middle of the iframe _2.html together with it's parent page.

can it be possible???

i post this problem in "HTML" division. but a guy who helped me, said that it is not possible.

for more view, please visit that post http://www.dynamicdrive.com/forums/showthread.php?t=60997

actually can do nothing with javascript also???

Please help me.... thnx.

coothead
02-27-2011, 11:26 AM
Hi there M rosi,

this can be done with a couple of lines of javascript. ;)

Check out the attachment for a basic working example.

coothead

M rosi
02-27-2011, 01:25 PM
WOW. that's the javascript that i'm looking for. thank you. thank you very much... :)

coothead
02-27-2011, 01:40 PM
No problem, you're very welcome. ;)

molendijk
02-27-2011, 03:10 PM
Coothead, nice code!
Arie.

coothead
02-27-2011, 03:25 PM
Thanks Arie,

but it only needed two lines of javascript. :D

coothead

molendijk
02-27-2011, 03:50 PM
I know, but it helped me see what I was doing wrong.
I was so much focused on not having to put an iframe on every page that I forgot what the question was really about.
===
Arie.

coothead
02-27-2011, 06:23 PM
Hi there Arie,

I was so much focused on not having to put an iframe on every page that I forgot what the question was really about.
Well, I can understand that. ;)

When I first read M rosi's original post in his other thread, I was totally bamboozled by his requirements. :confused:
Re-reading the same problem in this thread, though, the solution now appeared to be rather simple. :)

My recurring "Senior Moments" seems to be the reason for these odd mental states. :eek:

coothead

Beverleyh
02-28-2011, 11:48 AM
I second that coothead - you simplified everything!

coothead
02-28-2011, 12:06 PM
Hi there Beverley,

Thanks for the thumbs up. ;)

Are all Derbyshire lasses as sweet-natured as you? :)

coothead

Beverleyh
02-28-2011, 12:12 PM
ha, ha - possibly - it must be all the greenery

(*quick to correct reference to any dubious recreational shrubbery* the landscape, I mean the landscape!!!)

coothead
02-28-2011, 12:33 PM
Hi there Beverley,

I have no problems with recreational greenery. :D

It still puts a smile on my face. ;)

coothead