473,387 Members | 3,787 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,387 software developers and data experts.

problem with setting src of iframe in Firefox

Hi
All
I got a iframe tag performing on javascript funtion on Internet explorer is ok, but when i run on Fire Fox browse it dosenīt work fine.

How can solve that problem ?

Thanks

Expand|Select|Wrap|Line Numbers
  1. function LoadResults(){
  2. window.ifrmLimpaCookie.location.replace('DoLimpaCookie');
  3. }
[HTML]<iframe id="ifrmLimpaCookie" frameborder="0" scrolling="no" width="0" height="0" border="0" src="/catalogo/versao.html"></iframe>[/HTML]
Dec 19 '07 #1
7 2292
mrhoo
428 256MB
change the src of the iframe to the new location.href
Dec 19 '07 #2
mrhoo

Thanks for reply me!


Look i did so:
I changed src for location.href on iframe tag, but it dosenīt work!
Other ideia?

Thanks


[HTML]<html>
<head>
</head>
<body>

<iframe location.href='http://www.google.com.br/'></iframe>

</body>
</html>[/HTML]
Dec 19 '07 #3
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2.  
  3. <html>
  4. <head>
  5.     <title>Untitled</title>
  6. </head>
  7.  
  8. <script>
  9.  
  10. function changeUrl(url) {
  11. iframeElm = document.getElementById("myFrame")
  12. iframeElm.src = url
  13. }
  14.  
  15. </script>
  16.  
  17. <style>
  18. iframe {width:400px; height:250px; border:1px solid #000}
  19. </style>
  20.  
  21. <body>
  22.  
  23. <iframe src="" id="myFrame"></iframe><br>
  24.  
  25. <button onclick="changeUrl('http://www.thescripts.com')">Url 1</button>
  26. <button onclick="changeUrl('http://www.thescripts.com/forum/thread750687.html')">Url 2</button>
  27.  
  28. </body>
  29. </html>
  30.  
Instead of location.href you have to work the src attribute on the iframe tag
Check the sample above and feel free to change it to fulfill your needs
Good luck
Dec 19 '07 #4
mrhoo and Romulo NF

The Romulo NF code works !


Thanks for repla me.
Dec 19 '07 #5
gits
5,390 Expert Mod 4TB
hi ...

i've changed the thread-title ... please always use a good thread title ... firefox DOES support iframes :)

kind regards
Dec 19 '07 #6
drhowarddrfine
7,435 Expert 4TB
firefox DOES support iframes :)
In fact, Firefox supports iframe somewhat better than IE does.
Dec 20 '07 #7
gits
5,390 Expert Mod 4TB
In fact, Firefox supports iframe somewhat better than IE does.
hi doc ...

i know :) ... and i changed the thread title since it was stating that FF wouldn't support iframes ... as i'm a xul-developer i really know what FF/Moz are able to do and what they support ... btw. i think there is no reason to point out IEs weaknesses everytime a browsers name is involved (even i know that it must be said sometimes :) ) ... we all know that it is a silly failure to start developing on IE and then adapting any code for other browsers ... and doing it the opposite (start to develop for standards compliant browsers and then adapting it to IE) would be much better. but a lot of people always walk the first way ... since IE is commonly the most used browser and when you start webdevelopment you start with what you have ... you start with it because people like us had developed webapps that work in that browser as good as they can, and without difference to other browsers too ... and so we hided it from them :) ... and so without any knowledge about the tricks you need to do that, you see IE as a browser only ... and you don't know why you shouldn't use it, and you will learn it the hard way :) but even with all that in mind we have no chance not to support it ... and even how bad things are in IE ... we have to live with it ... since it will not getting better in the near future ... and i think we shouldn't start or even to provoke a browser-debate in the threads ...

kind regards
Dec 20 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: mike | last post by:
I have a page that uses a some javascript and it works fine in IE but fails to work in Firefox. Basically what I'm trying to do is have 3 iframes on a page but only displaying one of them at a...
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...
6
by: Valued Customer | last post by:
Hello, I'm really at a loss here. I have the following index.html: <div align="center"> <iframe src="left.htm" width="15%" height="100%" frameborder="0" name="left" target="contents">...
26
by: shlomi.schwartz | last post by:
using this example: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Test Page</title> </head>
18
by: len.hartley | last post by:
Hi, I am trying to pop-up a window when the user clicks on an image. The problem is that when the user clicks on the image and the window pops up OK, but the window underneath also proceeds to...
1
by: mike888 | last post by:
I want to create dynamic iframe content like below but in Firefox <iframe width="100%" height="100" src="#"></iframe> <script language="JavaScript"><!-- document.frames.document.open();...
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...
1
by: gzannd | last post by:
I have a problem with submitting a form to a PHP page through a dynamically created IFRAME in IE7. This code works fine in Firefox. However, IE7 submits an empty form--the correct PHP page is...
9
by: DL | last post by:
That is, for an iframe with onload attribute to preset a width and height then depending on the length of its content to auto-expand instead of scrolling. The following URL is quite interesting,...
0
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$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.