473,390 Members | 1,651 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,390 software developers and data experts.

FireFox and iframe.src

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 ">Your browser is
inferior and doesn't support IFRAMEs.</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?

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 23 '05 #1
6 18679
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 ">Your
browser is inferior and doesn't support IFRAMEs.</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;

Richard.
Jul 23 '05 #2
Richard Cornford wrote:
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;


Thanks!

Now, how do I also get it working with Opera?

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 23 '05 #3
Phlip wrote:
Richard Cornford wrote:
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;


Thanks!

Now, how do I also get it working with Opera?


It already does work with Opera, and Konqueror, Safari, IceBrowser, etc.
It is normal practice because it is the cross-browser method.

Richard.
Jul 23 '05 #4
Richard Cornford wrote:
iframe.location = outputUrl;


Thanks!

Now, how do I also get it working with Opera?


It already does work with Opera, and Konqueror, Safari, IceBrowser, etc.
It is normal practice because it is the cross-browser method.


The <iframe src="about:blank"> is inside a <span id="yo"
style="display:none">

Clicking a button switches the <span> to display:inline, and assigns the
iframe location.

What I thought was not "working" in Opera I now realize is a display bug.
Opera displayed the span and refreshed the iframe, but pushed them down off
the end of my window.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 23 '05 #5
Phlip wrote:
<iframe ... >Your browser is inferior and doesn't support IFRAMEs.</iframe>


Customer/Visitor: Your web site is inferior and has lost my business!

Please provide suitable alternate content so your site degrades
gracefully. A simple link to the iframe content would usually be suitable.
http://www.anybrowser.org/campaign/

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Jul 23 '05 #6
Lachlan Hunt wrote:
Phlip wrote:
<iframe ... >Your browser is inferior and doesn't support

IFRAMEs.</iframe>
Customer/Visitor: Your web site is inferior and has lost my business!

Please provide suitable alternate content so your site degrades
gracefully. A simple link to the iframe content would usually be suitable. http://www.anybrowser.org/campaign/ sigh<


I am aware this newsgroup educates HTML newbies.

My site is for in-house use /only/, and it has quite a few more technical
restrictions than just a W3C-compliant web browser:

http://www.c2.com/cgi/wiki?MiniRubyWiki

Kids - don't do that at home. Especially in text your boss might not notice
before your HTML goes online...

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 23 '05 #7

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

Similar topics

6
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...
12
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:...
1
by: sam | last post by:
Hi all, Hope some expert can help me resolve this. I am using the following code to resize an iframe according to the content in it so that the iframe does not use its scroll bar and uses the...
1
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...
3
by: Alexander Higgins | last post by:
Hello, I would like to thank everyone for there help in advance. I have form which is using an iframe as a Rich Text Editor. Everything works as expected in IE but I have two issues with...
3
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...
3
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...
1
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...
0
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...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
0
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...
0
marktang
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,...
0
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,...
0
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...

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.