472,967 Members | 1,922 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,967 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 11136
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.