• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1092
  • Last Modified:

Does FireFox support iframe's?

Hi all,

I am trying to do use iframes in webpages.
My webpages work fine with IE and Netscape but doesn't work when I use FireFox.

Does FireFox support iframes?
If not wht is the workaround for iframes for FireFox.


Thanks,
Fish.
0
bladefish
Asked:
bladefish
  • 3
  • 3
1 Solution
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
Yes, I use iframes myself and have never seen a problem
0
 
Marc ZCommented:
What errors or changes in display do you get?  Do you have a link with code so we can help sort it out?
0
 
bladefishAuthor Commented:
When I open my webpage using FireFox, I dont see the contents that are to be displayed in side the iFrame, but it works fine when I try to access the webpage using IE or NN.

Does the same piece of code for Iframes wrk for all the browsers???
0
[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

 
Marc ZCommented:
Apparently not if your webpage is not being displayed properly, but it could be a setting in your browser we need to adjust.  Can you give us a link or the code to figure out what is going on?
0
 
bladefishAuthor Commented:
Hi mtz,

Try the following link,

www.bladefish.somee.com/proj

user name: test
password: test

It is a small browser application, try it :)
It will work in IT and NN, but not in FF.

Thank you,
Fish
0
 
bladefishAuthor Commented:
Here is the code for the browser page:

<html>
<head>
<SCRIPT language=JavaScript>
<!-- http://www.spacegun.co.uk -->
      var message = "function disabled";
      function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){       alert(message); return false; }
      if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) {       alert(message);       return false; } }
      document.onmousedown = rtclickcheck;
</SCRIPT>
<title>Browse</title>
<style>
body {
  margin: 0;
  border: none;
  background-color: buttonface;
  font-family: Arial;
  font-size: 10pt;
}
td {
  font-size: 10pt;
}
</style>

<title>Untitled</title>
<script type="text/javascript">
<!--
function go() {
var n,o,i
n = document.getElementById("newAddr").value
o = document.getElementById("currAddr")
i = window.frames["newFr"]
if (n.indexOf("http://")!=0) n="http://"+n;
o.innerhtml = n.value
document.all.newFr.src = n
document.all.masterdiv.src = "abc.html"
nav.action=n
}
function load()
{
var i = document.getElementById("newFr").getAttribute("SRC");
}
function note()
{
var i = document.getElementById("newFr").getAttribute("SRC");
if (i=="about:blank") {alert("Enter a URL before you check for notes")}
else {document.all.masterdiv.src = "retrive.asp?url1="+i};

}
function launch() {
open('home.asp', '', 'resizable=yes, toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=no,type=fullWindow')
}
function hnote()
{
document.all.masterdiv.src = "abc.html"
}
function list()
{
document.all.masterdiv.src = "list.asp"
}
function reload(ur)
{
document.getElementById("newAddr").value = ur
document.all.newFr.src = ur
document.all.masterdiv.src = "retrive.asp?url1="+ur
}
// -->
</script>
</head>

<body STYLE="background-color:transparent">
<script type="text/javascript">

/***********************************************
* Floating Iframe script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Specify iframe to display. Change src and other attributes except "position" and "left/top":
var iframetag='<iframe id="masterdiv" src="abc.html" width="200px" height="170px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" style="position: absolute; left: -500px; top: -500px;" allowTransparency="true" ></iframe>'

//specify x coordinates of iframe ("right" for right corner, or a pixel number (ie: "20px")):
var masterdivleft="10px"

//specify y coordinates of iframe ("bottom" for bottom of page, or a pixel number (ie: "20px")):
var masterdivtop="bottom"

var ie=(document.all || window.opera) && document.getElementById
var iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body

if (ie)
document.write(iframetag)

function positionit(){
masterdivobj=document.getElementById("masterdiv")
var window_width=ie && !window.opera? iebody.clientWidth : window.innerWidth-20
window_height=ie && !window.opera? iebody.clientHeight : window.innerHeight
var dsocleft=ie? iebody.scrollLeft : pageXOffset
var masterdivwidth=masterdivobj.width
masterdivheight=masterdivobj.height
masterdivobj.style.left=(masterdivleft=="right")? window_width-masterdivwidth-20 : masterdivleft
setInterval("repositionit()", 100)
}

function repositionit(){
if (ie){
dsoctop=ie? iebody.scrollTop : pageYOffset
masterdivobj.style.top=(masterdivtop=="bottom")? window_height-masterdivheight-14+dsoctop : parseInt(masterdivtop)+dsoctop
}
}

if (window.attachEvent)
window.attachEvent("onload", positionit)


</script>

<TABLE height="100%" width="100%" cellspacing="0" cellpadding="0">
<TR>
<TD><TABLE WIDTH="100%" BORDER="0" CELLSPACING=0 CELLPADDING=0>
<TR>
<TD align="left" colspan="3"><INPUT type="button" style="height: 21;" value="Back" onclick="history.back()"><INPUT type="button" style="height: 21;" value="Forward" onclick="history.forward()"><INPUT type="button" style="height: 21;" value="Note" onclick="note()"><INPUT type="button" style="height: 21;" value="Hide Note" onclick="hnote()"><INPUT type="button" style="height: 21;" value="List" onclick="list()"><INPUT type="button" style="height: 21;" value="New Window" onclick="launch()">
</TD></TR>
<TR>
<FORM name="nav" method="GET" target="newFr" action="about:blank" onsubmit="go();">
<TD>Address</TD>
<TD align="left" width="100%"><INPUT style="width: 100%" type="text" size="50" id="newAddr" value="about:blank" onblur="if (this.value == '') {this.value='about:blank'}" onfocus="if (this.value =='about:blank') {this.value = ''}"></TD>
<TD><INPUT type="button" style="height: 21;" value="Go" onclick="go()"></TD></TR>
<TR><TD colspan="3">Current address: <span id="currAddr"></span></TD></TR>
</TABLE></TD></form></TR>

<TR height="100%"><TD valign="top"><iframe application="no" onload="load();" id="newFr" name="newFr" style="width: 100%; height: 100%" src="about:blank" /></TD>
</TR>
</TABLE>

</body>
</html>


Thanks,
Fish
0
 
Marc ZCommented:
If I am reading this correctly, From http://www.dynamicdrive.com/dynamicindex17/floatiframe.htm
 Then

"Note that this script is only visible in IE5+ and Opera 7+. A bug in NS6+ causing iframes to not follow the page disables the script from appearing in it."
Compatibility : FF1+: Firefox 1.0+. NS6+ and FF beta are assumed as well.

Did you notice the word Assumed?
Somebody, maybe leew, will be able to help you find the Correct setup for you. Thanks for the link. It will help finding the cure for you.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now