473,566 Members | 2,908 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.m ainform.preview .src = 'xxxx';
}
thx in advance
Jul 23 '05 #1
3 11164
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.m ainform.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:blan k" id="iframe_xml1 !format_text"
name="iframe_xm l1!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.getEle mentById("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.getEle mentById("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
22897
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" src="https://ourdomain/..." width="0" height="0" border="0"></iframe> The parent and iframe are both hosted in the same domain, and are both
2
2820
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 in asp based on the value I send it..how can I go about doing this? thanks -Jim
2
8599
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 form action. I've looked around, but I haven't managed to find a method yet, that does not utilitize some MS only method. So how do I do it, and...
5
15928
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 some data to the server (to url "myscript.peroli?q=something") and gets back with results. Everything happens inside the iframe, no interaction...
5
5392
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, the content shown in the IFrame does not refreshed sometimes unless I click the browser refresh button. I even use ...
5
178953
by: Jacob | last post by:
How do I refresh an iframe via JavaScript from the parent page? /Jacob
3
4474
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 includes background music with a javascript music player on the main page below an iframe that is used for all content and navigation of the site and...
2
12728
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 all of them - from the server (this could be on page refresh also) as the purpose is to reset the iframe to the original content in case the user...
0
7893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8109
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7645
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6263
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2085
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1202
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.