Forum Moderators: open

Message Too Old, No Replies

iframe content depending on menu choice

How to avoid refreshin the whole screen

         

lautrerable

6:39 pm on Feb 28, 2009 (gmt 0)

10+ Year Member



Hi,

I am struggling to develop my website based on what I can find on the web without any formal training.
I have succeeded in creating a two level menu where the 2nd level is displayed (expanded in accordeo fashion) when moving the cursor over the 1st level button thanks to a javascript found on the web which I customized.
The 2nd level of menu choices are to select one the months of the year for which the programmed activities of our association would be displayed in an iframe on the same page without refreshing the page.
In fact, I'd like any menu selection, be it level 1 or 2, to use the same iframe space on the screen.
The <ul>/<li> statement contains a link to be used when clicked on the particular menu key. How can I "replace" this link so that when clicked upon a partiular key the appropriate src="document.html" finds its way into the iframe ?

Many thanks for your help !

Lautrerable

dreamcatcher

1:43 pm on Mar 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello lautrerable, welcome to WebmasterWorld. :)

If its a link, don`t you just need a target reference to load the link in the iframe? Or am I mssing what you need?

<iframe name="iframe".../>

<a href="blah.html" target="iframe"..

dc

lautrerable

3:20 pm on Mar 2, 2009 (gmt 0)

10+ Year Member



Hi Dreamcatcher,
Thanks for the useful info. It works fine now.
However, ... (there's almost always a but ...).
In one instance my iframe is used to contain the (google) agenda of the club. Amazingly IE respects the size given in the iframe, but FF expands happily beyond the screen width. How can I force FF to respect the iframe size ?
Thank you in advance,
Lautrerable

lautrerable

5:43 pm on Mar 2, 2009 (gmt 0)

10+ Year Member



Hi,
Actually Firefox does not respect de iframe's boundary when "scroll" is allowed.
As it happens my iframe needs sometimes scroll and sometimes no scroll info displayed, so I have defined 2 identical <div>s one with a scroll iframe, the other one with a no scroll iframe.
IE7 works like a dream: I can have a scrolling or a no srolling frame on the same place depending to which one of the two iframes I direct the link.
FF on the contrary gets stuck. It doesn't refresh the iframe after he initial load: subsequent menu selections don't produce anything and the old info remains displayed. Weird ...
If I could use kind of a TRUE/FALSE tag to replace the scrolling="yes" or "no" this would avoid me having to use two overlaying iframes and FF might work correcty.
Would that be possible and if yes, what's the syntax ?
Thanks !