By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,629 Members | 1,793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,629 IT Pros & Developers. It's quick & easy.

iframe.src reload ?

P: n/a
Hi I wanna know how can I reload an iframe does I've to move my iframe
into another form an do a submit or may I can do it by another way

rigth now I'm been doing :

my form name is mainform and my iframe name is preview
function urlRewrite () {
...
this.document.mainform.preview.src = 'xxxx';
}
thx in advance
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Alexandre Jaquet wrote:
Hi I wanna know how can I reload an iframe does I've to move my iframe
into another form an do a submit or may I can do it by another way

rigth now I'm been doing :

my form name is mainform and my iframe name is preview
function urlRewrite () {
..
this.document.mainform.preview.src = 'xxxx';
}
I suspect I just asked that. The best answer was:

Richard Cornford wrote: Phlip wrote:
JavaScripties:

On the HTML side, we load an IFRAME with a blank page:

<iframe frameborder="0" marginwidth="0" marginheight="0"
scrolling="off" src="about:blank" id="iframe_xml1!format_text"
name="iframe_xml1!format_text" width="90%" height=" 180 ">My
site is inferior and doesn't deserve your support.</iframe>

Later, a button click populates this frame:

var iframe = window.frames[iframeName];
iframe.src = outputUrl;

That works on IE but not FireFox. Any tips?


The object returned by references via the - frames - collection are
window/frame object, while the object representing the HTML IFRAME
element would be found in the DOM of the document in the window/frame
object containing the - frames - collection. The - src - property is
expected to be on the IFRAME element (though frequently read only) not
the window object within the IFRAME.

To navigate window/frame object the normal practice is to assign a URL
to the location property of the frame in question (or assign a URL to
the - href - property of the object already referred to by the location
property):-

iframe.location = outputUrl;


If that didn't help, say what you are trying to do with pseudocode.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 23 '05 #2

P: n/a

"Alexandre Jaquet" <al***@floor.ch> wrote in message
news:d2**********@news.hispeed.ch...
Hi I wanna know how can I reload an iframe does I've to move my iframe
into another form an do a submit or may I can do it by another way


Iframe isn't a form element.

You give your iframe an ID, e.g.:
<iframe id="myif" src="[initialURL]"></iframe>

This ECMA script changes src property:

document.getElementById("myif").src = "[newURL]"

nf


Jul 23 '05 #3

P: n/a
nutso fasst a écrit :
"Alexandre Jaquet" <al***@floor.ch> wrote in message
news:d2**********@news.hispeed.ch...
Hi I wanna know how can I reload an iframe does I've to move my iframe
into another form an do a submit or may I can do it by another way

Iframe isn't a form element.

You give your iframe an ID, e.g.:
<iframe id="myif" src="[initialURL]"></iframe>

This ECMA script changes src property:

document.getElementById("myif").src = "[newURL]"

nf


yep thanks :)
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.