Re: Dynamic IFRAME problem



hi Thomas, thanks for the fast reply.

All your remarks were contributing.
unfortunately the problem is more complex.

the main issue is that:

when writing the IFRAME dynamically (use example 1) the first "src" is
somehow cached in the browser DOM.

allow me to explain a scenario:

1) Lets say the page loads and the variable rnd is set to 1
2) The documet.write() is called with Google src IFRAME
3) All is good the Google frame is shown
4) F5 ... refreshing
6) the page loads and the variable rnd is set to 9
7) The documet.write() is called with Yahoo src IFRAME
8) ERROR the Google frame is displayed

furthermore if we write "javascript:alert(document.body.innerHTML)" in
the address bar we can see that the IFRAME src is set correctly and
still the browser displays the wrong frame.

Any New idea?
;-)

.



Relevant Pages

  • Changing the Url of an Iframe with a selection box
    ... desired url they wish to visit from the main page the iframe then loads ... passing the value of the selection wich in this case is the url to the ... independant script wich will in turn will change the src of the iframe ... the initial src then use the onchange event form the select to change ...
    (comp.lang.javascript)
  • Re: Window and iframe question
    ... option 4 isn't practical for my case because each script right ... after each iframe have problem being executed under this application ... Initial SRC attribute value for IFRAME ... AFAICT at least IE 6.x and Firefox 2.x do allow to skip SRC attribute: ...
    (comp.lang.javascript)
  • Re: Window and iframe question
    ... it looks like the "onload" attribute has limitation on how many ... Initial SRC attribute value for IFRAME ... Either disregard it or use document.write in SCRIPT block to insert ...
    (comp.lang.javascript)
  • Re: XP SP2 cross-iframe scripting
    ... In XP SP2 the scripting engine ... document.write, using EditMode, or by changing .src attributes. ... to use myframe after setting theFrame.src would cause an error unless you ... >> I have an SP2 problem with an iframe environment where by setting ...
    (microsoft.public.scripting.jscript)

Loading