473,382 Members | 1,329 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,382 software developers and data experts.

Why doesn't this work correctly in FireFox?

Hi all,

I have created an ASPX page in VS 2008 that appears inside of an IFRAME
inside a standard HTML page. Because it loads from an external site and is
database driven, the first load takes a few seconds. As a result I have
placed an absolutely positioned <DIVelement that is built into the HTML
page that uses an animated GIF and a "Please Wait" message.

When the IFRAME finishes loading a javascript function is called to change
the Visibilty of the DIV to hidden. All this works fine with IE but in
Firefox the DIV remains visible. Below is the relevant code from the HTML
page.

Can anyone tell me why this doesn't work in FireFox?

-----------------------------------------------------------------
<td width="775" valign="top">
<iframe width="99%" style="z-index:1" height="820px" marginheight="4px"
marginwidth="4px" id="ifSearch" scrolling="no"
src="http://www.motillia.net/search.aspx" onload="iframe_onload();">
</iframe>
</td>

<script type="text/jscript" language="javascript">
function iframe_onload()
{
var theWaitCell = document.getElementById('Wait1');
theWaitCell.style.visibility = "hidden";
}
</script>

<div id="Wait1" style="visibility: visible; position: absolute; top: 40%;
left: 40%">
<table id="WaitTable1">
<tr>
<td id="WaitCell1" align="center" valign="middle"
style="background-color: Silver;
border-width: 4px; border-style: outset; color: White;
height: 100px; width: 300px;
font: vedana bold 16px">
<img alt="downloading" src="images/loadingAnimation.gif" />
<br />
Search Tool Initializing...
</td>
</tr>
</table>
</div>
--------------------------------------------------------------

Thanks for any help with this.
Sep 24 '08 #1
7 2198
it works correctly in firefox, its IE thats wrong (good old buggy IE).
setting visibility='hidden' mean do not display but take up space. you
probably wanted to make the div disappear and not take up space try:

theWaitCell.style.display = "none";
-- bruce (sqlwork.com)
"John Kotuby" wrote:
Hi all,

I have created an ASPX page in VS 2008 that appears inside of an IFRAME
inside a standard HTML page. Because it loads from an external site and is
database driven, the first load takes a few seconds. As a result I have
placed an absolutely positioned <DIVelement that is built into the HTML
page that uses an animated GIF and a "Please Wait" message.

When the IFRAME finishes loading a javascript function is called to change
the Visibilty of the DIV to hidden. All this works fine with IE but in
Firefox the DIV remains visible. Below is the relevant code from the HTML
page.

Can anyone tell me why this doesn't work in FireFox?

-----------------------------------------------------------------
<td width="775" valign="top">
<iframe width="99%" style="z-index:1" height="820px" marginheight="4px"
marginwidth="4px" id="ifSearch" scrolling="no"
src="http://www.motillia.net/search.aspx" onload="iframe_onload();">
</iframe>
</td>

<script type="text/jscript" language="javascript">
function iframe_onload()
{
var theWaitCell = document.getElementById('Wait1');
theWaitCell.style.visibility = "hidden";
}
</script>

<div id="Wait1" style="visibility: visible; position: absolute; top: 40%;
left: 40%">
<table id="WaitTable1">
<tr>
<td id="WaitCell1" align="center" valign="middle"
style="background-color: Silver;
border-width: 4px; border-style: outset; color: White;
height: 100px; width: 300px;
font: vedana bold 16px">
<img alt="downloading" src="images/loadingAnimation.gif" />
<br />
Search Tool Initializing...
</td>
</tr>
</table>
</div>
--------------------------------------------------------------

Thanks for any help with this.
Sep 24 '08 #2
"John Kotuby" <jk*******@comcast.netwrote in message
news:eW**************@TK2MSFTNGP02.phx.gbl...
Can anyone tell me why this doesn't work in FireFox?
As Bruce has explained, FireFox is working correctly - it is IE which is out
of kilter with the industry standards...

If you are developing public websites and are interested in cross-browser
compatibility, testing against IE (especially IE6) is one of the worst
things you can do...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 24 '08 #3
Thanks bruce, I really thought what you suggested would do the trick. I was
SO sure that I didn't try the "fix" until a few minutes ago.

Now that I use... theWaitCell.style.display = "none";

It still works in IE7 but not in FireFox 3. I added an alert(); to the
function iframe_onload() and discovered that in FF the Alert box doesn't
even display. It appears that FF3 is not respecting the
onload="iframe_onload();" but IE7 is.

Everything I have read indicates that FF should have no problem with the
IFrame onload event.

This is becoming very perplexing for what should be a simple issue.

Thanks for your help...but you (and Mark Rae) are correct in that IE is the
ugly duckling of the lot of browsers and I will test in FF from now on.

"bruce barker" <br*********@discussions.microsoft.comwrote in message
news:D0**********************************@microsof t.com...
it works correctly in firefox, its IE thats wrong (good old buggy IE).
setting visibility='hidden' mean do not display but take up space. you
probably wanted to make the div disappear and not take up space try:

theWaitCell.style.display = "none";
-- bruce (sqlwork.com)
"John Kotuby" wrote:
>Hi all,

I have created an ASPX page in VS 2008 that appears inside of an IFRAME
inside a standard HTML page. Because it loads from an external site and
is
database driven, the first load takes a few seconds. As a result I have
placed an absolutely positioned <DIVelement that is built into the HTML
page that uses an animated GIF and a "Please Wait" message.

When the IFRAME finishes loading a javascript function is called to
change
the Visibilty of the DIV to hidden. All this works fine with IE but in
Firefox the DIV remains visible. Below is the relevant code from the HTML
page.

Can anyone tell me why this doesn't work in FireFox?

-----------------------------------------------------------------
<td width="775" valign="top">
<iframe width="99%" style="z-index:1" height="820px" marginheight="4px"
marginwidth="4px" id="ifSearch" scrolling="no"
src="http://www.motillia.net/search.aspx" onload="iframe_onload();">
</iframe>
</td>

<script type="text/jscript" language="javascript">
function iframe_onload()
{
var theWaitCell = document.getElementById('Wait1');
theWaitCell.style.visibility = "hidden";
}
</script>

<div id="Wait1" style="visibility: visible; position: absolute; top: 40%;
left: 40%">
<table id="WaitTable1">
<tr>
<td id="WaitCell1" align="center" valign="middle"
style="background-color: Silver;
border-width: 4px; border-style: outset; color: White;
height: 100px; width: 300px;
font: vedana bold 16px">
<img alt="downloading" src="images/loadingAnimation.gif"
/>
<br />
Search Tool Initializing...
</td>
</tr>
</table>
</div>
--------------------------------------------------------------

Thanks for any help with this.

Sep 24 '08 #4
Thanks Mark,

You are correct that FF is the better browser to test in as I have
encountered alignment issues there that weren't apparent in IE and were
indicative of poor coding such as failing to delcare align="center" in a
table cell while expecting the contents to center themselves. Yeah, I use
tables even though it's frowned upon in "modern" web design.

Anyway, I have tried using... theWaitCell.style.display = "none" in the
iframe onload event handler.
It still works in IE7 but not in FireFox 3.

I added an alert(); to the function iframe_onload() and discovered that in
FF the Alert box doesn't
even display. It appears that FF3 is not respecting the
onload="iframe_onload();" but IE7 is.

Everything I have read indicates that FF should have no problem with the
IFrame onload event.

This is becoming very perplexing for what should be a simple issue.

Any idea why the iframe onload event is not firing in FF?

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:en**************@TK2MSFTNGP06.phx.gbl...
"John Kotuby" <jk*******@comcast.netwrote in message
news:eW**************@TK2MSFTNGP02.phx.gbl...
>Can anyone tell me why this doesn't work in FireFox?

As Bruce has explained, FireFox is working correctly - it is IE which is
out of kilter with the industry standards...

If you are developing public websites and are interested in cross-browser
compatibility, testing against IE (especially IE6) is one of the worst
things you can do...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 24 '08 #5
"John Kotuby" <jk*******@comcast.netwrote in message
news:uu**************@TK2MSFTNGP04.phx.gbl...

[please don't top-post]
>As Bruce has explained, FireFox is working correctly - it is IE which is
out of kilter with the industry standards...

Anyway, I have tried using... theWaitCell.style.display = "none" in the
iframe onload event handler. It still works in IE7 but not in FireFox 3.
Everything I have read indicates that FF should have no problem with the
IFrame onload event.

This is becoming very perplexing for what should be a simple issue.

Any idea why the iframe onload event is not firing in FF?
FireFox is "properly" standards-compliant - are you sure your markup and/or
JavaScript is...?

E.g. your <scripttag has a language attribute - that's been deprecated for
years. Have you validated everything...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 25 '08 #6
John Kotuby wrote:
Can anyone tell me why this doesn't work in FireFox?
<script type="text/jscript" language="javascript">
JScript is the name of Microsoft's implementation of Javascript. I
believe that Firefox is ignoring the script tag as the language is not
recognised.

Try:

<script type="text/javascript">

--
Göran Andersson
_____
http://www.guffa.com
Sep 25 '08 #7
"Göran Andersson" <gu***@guffa.comwrote in message
news:es*************@TK2MSFTNGP06.phx.gbl...
John Kotuby wrote:
>Can anyone tell me why this doesn't work in FireFox?
><script type="text/jscript" language="javascript">

JScript is the name of Microsoft's implementation of Javascript. I believe
that Firefox is ignoring the script tag as the language is not recognised.

Try:

<script type="text/javascript">

--
Göran Andersson
_____
http://www.guffa.com
Göran thank you,

That was the problem. I was using proprietary Microsoft language. After
changing the Script tag to read <script type="text/javascript" the event
fires in both IE and FF.

BTW... It appears that either syntax:
theWaitCell.style.display = "none";
or
theWaitCell.style.visibility = "hidden";
works properly in both browsers.

I will be very careful from now on to use standards-compliant coding and
test first in FF.

Now I must comb through my other work and see if I have made the same
mistake elsewhere. I think the jscript reference got pulled into my code by
copying example code from VStudio or MSDN help examples.

Thanks again Göran

Sep 25 '08 #8

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

Similar topics

6
by: Cliff R. | last post by:
Hi, I use a handy little Javascript Flash detection script on a number of sites (copied below). Usually works great, but I just started trying Firefox and it's not working. A few browsers are...
4
by: Joe | last post by:
Hello, I have created a login page using dotnet. I am using requiredFieldValidator and noticed that the code works fine in IE but not in Netscape, Opera, Mozilla, Firefox, etc. For example...
45
by: Pat | last post by:
its seems asp.net validation doesn't fire when using FireFox? Tested a page and it doesn't fire. It seems the javascript doesn't fire Any ideas?
21
by: briggs | last post by:
<html> <head> <script> /* AddChild */ function ac() { var c; var p = document.getElementById("p"); for (var i = 0; i < 5; i++) { c = document.createElement("DIV"); // Create 'div' element.
1
by: Andrea | last post by:
Well, I've tried to create a stupid custom validator to validate a checked checkbox. Really simple, really stupid, but it's just for trying to do something better than standard validator, that...
23
by: wylbur37 | last post by:
I'm running an Apache server on my own computer (Windows XP Pro). I wrote a simple PHP script (called test3.php) that I'm running by putting the following URL in the address bar of the browser...
1
by: mathewda | last post by:
Hey, I'm having a problem that I consider kinda weird that is alluding me at the moment. I've wrote some code that will set up an XMLHttpRequest, it then makes a call to open and send and sets the...
8
by: vietgurlqt | last post by:
I don't what is wrong my site but some of my members cant view it on firefox. I been browsing the net for answer but i havent find the solution. Some said add <!DOCTYPE HTML PUBLIC "-//W3C//DTD...
0
by: John Kotuby | last post by:
Hi all, I have created an ASPX page in VS 2008 that appears inside of an IFRAME inside a standard HTML page. Because it loads from an external site and is database driven, the first load takes a...
0
isladogs
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...
0
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,...
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:
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...
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...

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.