I've written several utility pages that use a dynamically created
iframe. The iframe typically has a form that is populated by the main
page. Then the form is submitted to be processed, and the returning
page does something -- call a function on the main page, change a
variable on the main page, etc.
All this stuff I created works on IE. Sorry, didn't have other browsers
available to test. Now I have access to a machine with FF, and none of
these scripts work.
So, short and sweet: What is the proper way to reference a form on an
iframe from the parent doc in firefox? Also, call a function from the
parent to the iframe, and vice-versa, call a function on the parent doc
from the iframe when it loads?
TIA... 6 10925
Did you check the error messages in the Tools/JavascriptConsole ?
Have a look also in the Tools/DOM inspector.
"Razzbar" <gl***@potatoradio.f2s.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com... I've written several utility pages that use a dynamically created iframe. The iframe typically has a form that is populated by the main page. Then the form is submitted to be processed, and the returning page does something -- call a function on the main page, change a variable on the main page, etc.
All this stuff I created works on IE. Sorry, didn't have other browsers available to test. Now I have access to a machine with FF, and none of these scripts work.
So, short and sweet: What is the proper way to reference a form on an iframe from the parent doc in firefox? Also, call a function from the parent to the iframe, and vice-versa, call a function on the parent doc from the iframe when it loads?
TIA...
Razzbar wrote: I've written several utility pages that use a dynamically created iframe. The iframe typically has a form that is populated by the main page. Then the form is submitted to be processed, and the returning page does something -- call a function on the main page, change a variable on the main page, etc.
All this stuff I created works on IE. Sorry, didn't have other
browsers available to test. Now I have access to a machine with FF, and none
of these scripts work.
So, short and sweet: What is the proper way to reference a form on an iframe from the parent doc in firefox? Also, call a function from the parent to the iframe, and vice-versa, call a function on the parent
doc from the iframe when it loads?
TIA...
Should be something here... http://www.faqts.com/knowledge_base/index.phtml/fid/127
Paul J. Le Genial wrote: Did you check the error messages in the Tools/JavascriptConsole ? Have a look also in the Tools/DOM inspector.
Yes, but the information wasn't useful. It's a compatibility issue,
with IE being non-DOM compliant in the way you refer to an iframe.
I found the DOM way to address the iframe here, http://www.codingforums.com/showthread.php?t=45000
Basically, the DOM way to refer to an iframe element from the parent
doc is
document.getElementById('iframeId').contentDocumen t.getElementById('elementID')
While the IE way is
document.frames['frameName'].elementName
Should be. Seperating the wheat from the chaff is the problem. Most of
those examples are not crossbrowser solutions. There doesn't seem to be
one way that works with IE
and the DOM.
Razzbar wrote: Should be. Seperating the wheat from the chaff is the problem. Most
of those examples are not crossbrowser solutions. There doesn't seem to
be one way that works with IE and the DOM.
iframes are unusual in that they are represented in the DOM by *two*
host objects, an HTMLElement object & a window (frame) type object.
Which one you access depends, naturally, on what you need to do with
it. To allow cross-referencing, the special properties 'contentWindow'
and 'contentDocument' were created. http://mips.ath.cx/js-iframe-content.html
"Razzbar" <gl***@potatoradio.f2s.com> wrote in message news:11*********************@o13g2000cwo.googlegro ups.com... I found the DOM way to address the iframe here, http://www.codingforums.com/showthread.php?t=45000 Basically, the DOM way to refer to an iframe element from the parent doc is document.getElementById('iframeId').contentDocumen t.getElementById('elementID')
For the frames method, you can get to the iframe's doc (cross browser) with:
window.frames[frameIdentifier].document...
IE can also do (note capitalization):
document.getElementById('iframeId').Document.getEl ementById('elementID')
document.getElementById('iframeId').Document.all['elementID']
Csaba Gabor from Vienna This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: hibernate |
last post by:
I'm somewhat new to javascript/DHTML, and this problem has been
plaguing me. I have made an 'array' of <div> tags within my html
document like so:
<div id="menu"> menu1 </div>
<div id="menu">...
|
by: NoCopy na |
last post by:
Using the following example:
domiframetest.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html...
|
by: David |
last post by:
Hey,
I'm not quite sure where to post this, but I believe this is the most
appropriate place. I have a page I am creating that does a submission
within a hidden IFRAME every time someone adds...
|
by: ukrbend |
last post by:
I'm new to Javascript and to html and am trying to make the following
code snippet work but it doesn't. It refuses to call the getPage()
function and I always get a 404 error. I know the code is...
|
by: cweeks |
last post by:
I am using the Webbrowser control in VS 2005 C# Express to automate the
navigation of pages on a partner's web site. The first page contains
an <IFRAME> element:
<iframe style='width:40;...
|
by: Jeremy |
last post by:
If we have an iframe loaded from the same domain as the parent document,
how can we (is it possible) to execute a function on the parent
document's page?
e.g.
1) On parent page:...
|
by: Daz |
last post by:
Hi everyone. I have just been making a JavaScript chat applet, which
should open in a new child window. It does all of this fine, and works
within Firefox beatifully. However, IE thinks it's...
|
by: dhanasekaran1980 |
last post by:
Hi,
I am using IFRAMES to load 3rd party domains in my website. I am facing
few problems using IFRAMES in IE and Firefox.
1) I am unable to login into the 3rd party website within the IFRAME....
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |