473,287 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

iframe.src reload ?

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
3 11153
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

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bb | last post by:
I am trying to force an iframe to refresh from the server using the following javascript: document.frames("frm").document.location.reload(true) The iframe html is: <iframe id="frm" name="frm"...
2
by: Jim | last post by:
I want to pass a value from the parent to the iframe when I click a button, the parent will reload and the iframe should show the data I need... when the iframe loads I want it to run something...
2
by: Kim Noer | last post by:
Hi there.. I have a file that contains three iframes, when one of the iframes is updated (via <form target ...> then it must 'refresh/reload' the originating iframe, ie. the iframe that sent the...
5
by: Peroli | last post by:
Hi all, I have an iframe as stated below. When i initiate the function "open_frm()" everything is working as i expected. When the document is loaded, i click on a link in the iframe, with posts...
5
by: Chen Zhigao | last post by:
My main html page contains an IFrame in which another html page is shown. The main page can trigger my CGI program to re-generate the IFrame html page with quite some data from a database. However,...
5
by: Jacob | last post by:
How do I refresh an iframe via JavaScript from the parent page? /Jacob
3
by: PCgeek | last post by:
sorry moved this over to javascript forum, didn't mean to post 2x! Hi guys, I'm trying to put the finishing touches on my website and could really use some help on this particular issue. My page...
2
by: ericisjusteric | last post by:
I have a page with multiple iframes and need to have the user (ie6) be able to click a button to refresh any one of the iframes - but also to click another button at the top of the page to refresh...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.