dynamic src of IFRAME

S

seans

Hi,

Please, can somebody help me with this? I have two iframes. The
contents of the first iframe are changed dynamically at run time. I
want to take the contents of the first iframe and display them in the
second iframe. Is it possible to do this? I tried using the following
code:

function getLframe() {

return parent.frames['frame1']
}

function getLframedoc() { return (getLframe()).document
}

str = (getLframedoc()).documentElement.outerHTML
document.all.iframe2.src = str

but all I get is the message "Bad Request (Invalid URL)" displayed in
the second frame. Is it possible to do this or must the string be a
file/url?

thanks again.

sean
 
R

Randy Webb

seans said the following on 8/30/2005 9:36 AM:
Hi,

Please, can somebody help me with this? I have two iframes. The
contents of the first iframe are changed dynamically at run time. I
want to take the contents of the first iframe and display them in the
second iframe. Is it possible to do this?

Yes. If the first IFrame is changed dynamically at run time, have
whatever mechanism is dynamically changing it to dynamically change the
second one.
I tried using the following code:

function getLframe() {

return parent.frames['frame1']
}

function getLframedoc() { return (getLframe()).document
}

str = (getLframedoc()).documentElement.outerHTML
document.all.iframe2.src = str
but all I get is the message "Bad Request (Invalid URL)" displayed in
the second frame. Is it possible to do this or must the string be a
file/url?

Looks like a whole lot of trouble to produce IE only code.

See above.
 
S

seans

Randy said:
seans said the following on 8/30/2005 9:36 AM:
Hi,

Please, can somebody help me with this? I have two iframes. The
contents of the first iframe are changed dynamically at run time. I
want to take the contents of the first iframe and display them in the
second iframe. Is it possible to do this?

Yes. If the first IFrame is changed dynamically at run time, have
whatever mechanism is dynamically changing it to dynamically change the
second one.
I tried using the following code:

function getLframe() {

return parent.frames['frame1']
}

function getLframedoc() { return (getLframe()).document
}

str = (getLframedoc()).documentElement.outerHTML
document.all.iframe2.src = str
but all I get is the message "Bad Request (Invalid URL)" displayed in
the second frame. Is it possible to do this or must the string be a
file/url?

Looks like a whole lot of trouble to produce IE only code.

See above.


Thanks to both of you for your help.

sean
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top