473,545 Members | 1,932 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IFrame and Firefox

I am having problems with IFrames and Firefox.

To make things simple I have index.html and frame.html:

------------ index.html -----------------
<html>
<head>
<title></title>
<script language="javas cript" type="text/javascript">
<!-- Hide from Non-Javascript browsers
function getTextBoxValue ()
{
responce =
document.frames["myFrame"].document.getEl ementById("myTe xtBox").value;
alert(responce) ;
}
function getIFrameSRC()
{
responce = document.frames["myFrame"].src;
alert(responce) ;
}

// Stop Hiding -->
</script>
</head>
<body>

<h1>Here is the IFrame</h1>

<iframe id="myFrame" name="myFrame" src="./frame.html"></iframe>

<br /><br />

<input type="button" onClick="getTex tBoxValue();" value="Get Text Box
Value" />
&nbsp;&nbsp;&nb sp;&nbsp;
<input type="button" onClick="getIFr ameSRC();" value="Get IFrame SRC"
/>

</body>
</html>
------------ frame.html -----------------
<html>
<head>
<title></title>
</head>
<body>
Hello, I am in your frame...
<br /><br />
<input type="text" name="myTextBox " />
</body>
</html>
My problem is anytime I try to reference the IFrame and beyond, I get
the following error:

Error: document.frames has no properties

This works fine in IE.

How can I reference the IFrame and its contents in Firefox?

Thanks in advance...

Jul 23 '05 #1
1 6491
Well, IE is incorrectly returning an object on the wrong parent, and your
code is
misaddressing the iframe, as window.document and window.myFrame are
siblings and they have the
same parent, WINDOW, so, Firefox is correctly not returning an object for
the wrong addressing,
should be window.frames['myframe'] or window.myFrame;

Danny

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
2469
by: wangzx | last post by:
I am the author of easyajax.sourceforge.net, and I have a problem on Firefox 1.5, I post the problem here and hopes somebody help me. The test page can be: http://easyajax.sourceforge.net/demo/overview.html The page works well in Firefox 1.0.* and IE 6.0, and Opera 8.5, but it doesnt work on Firefox 1.5, the first time you open the page,...
14
18266
by: Aaron Gray | last post by:
Hi, I want to access the properties of an IFrame but seem unable to get access to the IFrames document body. <html> <body> <iframe src="test.html" id="IFrame"></iframe> </body>
1
17522
by: brussel | last post by:
I'm trying to copy information in one iframe to another iframe with javascript. I am using firefox and information from my local domain so there are no security issues. However I'm just not getting it. Somebody please give me some help here, perhaps show me the right tag names. I'm tired of trial and error guessing. Are there any good books that...
1
10372
by: Dave | last post by:
Usual apologies if this is old territory. I'm resizing a bunch of iframes on a page to the height of their contained documents. Some of the contained documents contain IMG tags. On IE this doesn't cause a problem and the resize works correctly. On Firefox, if an image extends below the last line of text in the document, that bit gets...
12
11122
by: mistral | last post by:
Can anybody tell me how to get source code of page in iframe? (popup window is clickable image). When I right click on this popup border to view source, i see just as follows <html> <head> <title>New offer!</title> </head> <body style="margin-left: 0%; margin-right: 0%; margin-top: 0%;
3
18540
by: visu | last post by:
Hi , I need a solution for my problem with IFRAME in firefox. The problem is that i ve to make the IFRAME to increase in its height to displays its whole content dynamically .i ve set scrolling=0 ,i dont want the scroll bars to appear in the IFRAME. I ve achieved this somehow thru javascript in IE.. but it is not working in Firefox.. is...
3
3368
by: CAG | last post by:
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...
1
8007
by: Sura | last post by:
Hi I have a flash interactive window which has html links and this appears on an html page. This window can be moved with the mouse on the html page. The html page has an iFrame too. When the flash window comes above the iframe area the html links stop working. Yet the links remain active when the flash window is outside the iFrame area....
0
7760
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...
1
3524
by: SunshineInTheRain | last post by:
My project has 3 files, File1 has included master page. file1 consists of iframe1 that load file2. File2 consists of iframe2 that load file3. Javascript used on each file to resize the iframe height based on the each iframe's content height. It is work well on IE, but the error "has no properties" occured with firefox on code as below....
0
7411
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
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
7439
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
7773
tracyyun
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...
1
5343
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
4962
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
3468
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1901
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
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.