CAG 4
New Member
Hello,
I have following scenario in my web application.
I want to load different web forms in single iframe. Iframe in contained in an ASP page. ASP page has “Submit” button, which submits iframe form, & then load new form in same frame.
This is more like slide show of child forms. ASP button also has “Back” button which loads previously submitted form in same iframe. On click of “submit” button, it resubmits child form.
This works fine in IE 6. But in firefox “re-submission” of form does not take place. So that in firefox, child form gets submitted only once.
Sample code - function setURL(form_url)
-
{
-
var iframe = “<iframe id= iframe name= “ + form_label + “ src= ” + form_url;
-
document.getElementById(“div_name”).innerHTML = iframe;
-
}
-
-
function submitForm()
-
{
-
var frameObj = window.frames.form_label;
-
if(frameObj.document.childForm)
-
{
-
frameObj.document.childForm.submit();
-
setURL(nextForm_url);
-
}
-
}
above if condition fails in firefox when same child form(i.e with form_label value) is reloaded in iframe. Same code works fine in IE.
Thanks in advanced.
3 3382 gits 5,390
Recognized Expert Moderator Expert
hi ...
you posted into the articles-section rather then in the forum ... i moved it across for you ... so that the experts may find and answer it ...
kind regards
I have a very similar problem, i think this is an Firefox bug. I have posted it an i am waiting for an answer...
We have the next situation:
- page with an iframe.
- the iframe contents a function called f().
We want to load the iframe and execute a function inside iframe from outside iframe.
We follow the next steps:
Step 1 - Button "load div_content": Ok.
Step 2 - Execute function f()
Execute function from inside iframe: Ok.
Execute function from outside iframe: Ok.
Step 3 - View location.href of iframe: Ok.
From inside: Ok.
From outside: Ok.
And we go to the beginning:
Step 1 - Reload div_content: Ok.
Step 2 - Execute function f()
Execute function from inside iframe: Ok.
Execute function from outside iframe: ERROR.
Step 3 - View location.href of iframe
From inside: Ok.
From outside: ERROR.
The second time we load the div_content with the same code, the function f() inside iframe is not accessible.
If we load the div_content with the same code changing the name of iframe (idFrame, idFrame2, idFrame3,...) the first load works fine, but if we reload an ancient iframe the function inside iframe is not accessible.
Init.html
-----------------------------------------------------------------------------
[HTML]<html>
<head>
<title>Init</title>
</head>
<body>
<input type="button" value="Step 1- load div_content" onClick="docume nt.getElementBy Id('div_content ').innerHTML='< iframe id=\'idFrame\' name=\'idFrame\ ' src=\'iframe.ht ml\' ></iframe>'" ><br>
<input type="button" value="Step 2 - execute function f() inside iframe" onClick="window .frames['idFrame'].f()" ><br>
<input type="button" value="Step 3 - view location " onClick="alert( window.frames['idFrame'].location.href) ;" ><br>
<div id="div_content ">
</div>
</body>
</html>[/HTML]
iframe.html
-----------------------------------------------------------------------------
[HTML]<html>
<head>
<title>Iframe </title>
<script type="text/javascript">
function f()
{
alert('Fucntion f().');
}
</script>
</head>
<body>
<input type="button" value="Step 2 - execute function f() inside iframe" onClick="f()" >
<input type="button" value="Step 3 - view location" onClick="alert( self.location)" >
</body>
</html>[/HTML]
CAG 4
New Member
I have a very similar problem, i think this is an Firefox bug. I have posted it an i am waiting for an answer...
We have the next situation:
- page with an iframe.
- the iframe contents a function called f().
We want to load the iframe and execute a function inside iframe from outside iframe.
We follow the next steps:
Step 1 - Button "load div_content": Ok.
Step 2 - Execute function f()
Execute function from inside iframe: Ok.
Execute function from outside iframe: Ok.
Step 3 - View location.href of iframe: Ok.
From inside: Ok.
From outside: Ok.
And we go to the beginning:
Step 1 - Reload div_content: Ok.
Step 2 - Execute function f()
Execute function from inside iframe: Ok.
Execute function from outside iframe: ERROR.
Step 3 - View location.href of iframe
From inside: Ok.
From outside: ERROR.
The second time we load the div_content with the same code, the function f() inside iframe is not accessible.
If we load the div_content with the same code changing the name of iframe (idFrame, idFrame2, idFrame3,...) the first load works fine, but if we reload an ancient iframe the function inside iframe is not accessible.
Init.html
-----------------------------------------------------------------------------
[HTML]<html>
<head>
<title>Init</title>
</head>
<body>
<input type="button" value="Step 1- load div_content" onClick="docume nt.getElementBy Id('div_content ').innerHTML='< iframe id=\'idFrame\' name=\'idFrame\ ' src=\'iframe.ht ml\' ></iframe>'" ><br>
<input type="button" value="Step 2 - execute function f() inside iframe" onClick="window .frames['idFrame'].f()" ><br>
<input type="button" value="Step 3 - view location " onClick="alert( window.frames['idFrame'].location.href) ;" ><br>
<div id="div_content ">
</div>
</body>
</html>[/HTML]
iframe.html
-----------------------------------------------------------------------------
[HTML]<html>
<head>
<title>Iframe </title>
<script type="text/javascript">
function f()
{
alert('Fucntion f().');
}
</script>
</head>
<body>
<input type="button" value="Step 2 - execute function f() inside iframe" onClick="f()" >
<input type="button" value="Step 3 - view location" onClick="alert( self.location)" >
</body>
</html>[/HTML]
I got solution to my problem,
In my case I need to gave unique name to iframe each time.
With this dynamically given name I'm able to access the form loaded in iframe each time.
Thanks for support. :)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: cont |
last post by:
Hi I have the following simple page:
<HTML>
<TITLE>Test</TITLE>
<HEAD>
<script language="javascript">
function doSubmit()
{
alert('test');
window.frames.item(0).updateParent();
|
by: markus.rietzler |
last post by:
i want to do (multiple) file upload(s) and display a progress bar.
with firefox and safari it is no problem at all. only IE makes some
problems.
my script is based on ajax-uploader, which can be found at
www.srmiles.com/freestuff/ajax_file_uploader/ . you can do multiple
file uploads. each upload will have it's own "form"-tag, so that each
file is uploaded for its own. could be a good solution if there are
"big" uploads.
|
by: Tom Cole |
last post by:
IFrames have been used by years for people to accomplish many of the
tasks the XMLHttpRequest does for them now...I unfortunately am late
in the game and XMLHttpRequest was already out there by the time I got
serious about using Javascript for more than just rollover images...
I now would like to learn about the concept for the purposes of
creating Ajax-like requests across domains.
I felt like I had the basic concept down, but am...
|
by: XP |
last post by:
Hello Everyone,
I was stuck with this really frustrating problem for sometime. Let me
explain what I am trying to achieve: There is a form and an inner
iframe. The form's target is set to the iframe so that when the form
is submitted, the page does not get reloaded/changed ( as the iframe
would be the one getting refreshed. The Iframe is set to have 0 width
and height to make it look invisible ).
I have a copied the html source ( at...
|
by: linuskamb |
last post by:
I have a problem which is a slight twist on discussions I have seen previously here and elsewhere.
I have a form with an input select combo box whose target is an internal static iframe. The form can possibly be submitted several times as users change the selection in the combo box.
On first selection (and form submit) the resulting content is properly directed into the iframe.
However, on subsequent form submits, a new window is...
| |
by: tequilamala |
last post by:
I have an Iframe in one of the pages i am developing... the iframe is suppose to scroll up and down and the links target the iframe. the problem is that the iframe scrolls side to side on internet explorer but not on firefox. I dont want it to scroll sideways. in index.htm the iframe is at the bottom of the code.
index.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">...
|
by: dmorand |
last post by:
I'm having an issue in IE6 (not an issue in IE7 or Firefox) where the file save dialog window isn't appearing. I'm using a hidden iframe to prompt for a download when a user clicks a link. Any help would be appreciated.
<script type="text/javascript">
function download_req_doc(req_doc){
var answer = confirm("Would you like to download the required documents?")
if(answer){
valid_req_doc = document.getElementById(req_doc).value...
|
by: vunet |
last post by:
It is recommended by some sources I found to create IFrames in IE
using
document.createElement('<iframe src="#">')
instead of document.createElement('iframe').
Why and what browser versions to use it? IE5 or IE6?
Thanks
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |