473,770 Members | 2,143 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="4 px"
marginwidth="4p x" id="ifSearch" scrolling="no"
src="http://www.motillia.ne t/search.aspx" onload="iframe_ onload();">
</iframe>
</td>

<script type="text/jscript" language="javas cript">
function iframe_onload()
{
var theWaitCell = document.getEle mentById('Wait1 ');
theWaitCell.sty le.visibility = "hidden";
}
</script>

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

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

theWaitCell.sty le.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="4 px"
marginwidth="4p x" id="ifSearch" scrolling="no"
src="http://www.motillia.ne t/search.aspx" onload="iframe_ onload();">
</iframe>
</td>

<script type="text/jscript" language="javas cript">
function iframe_onload()
{
var theWaitCell = document.getEle mentById('Wait1 ');
theWaitCell.sty le.visibility = "hidden";
}
</script>

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

Thanks for any help with this.
Sep 24 '08 #2
"John Kotuby" <jk*******@comc ast.netwrote in message
news:eW******** ******@TK2MSFTN GP02.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.sty le.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*********@di scussions.micro soft.comwrote in message
news:D0******** *************** ***********@mic rosoft.com...
it works correctly in firefox, its IE thats wrong (good old buggy IE).
setting visibility='hid den' mean do not display but take up space. you
probably wanted to make the div disappear and not take up space try:

theWaitCell.sty le.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="4 px"
marginwidth="4 px" id="ifSearch" scrolling="no"
src="http://www.motillia.ne t/search.aspx" onload="iframe_ onload();">
</iframe>
</td>

<script type="text/jscript" language="javas cript">
function iframe_onload()
{
var theWaitCell = document.getEle mentById('Wait1 ');
theWaitCell.sty le.visibility = "hidden";
}
</script>

<div id="Wait1" style="visibili ty: visible; position: absolute; top: 40%;
left: 40%">
<table id="WaitTable1" >
<tr>
<td id="WaitCell1" align="center" valign="middle"
style="backgro und-color: Silver;
border-width: 4px; border-style: outset; color: White;
height: 100px; width: 300px;
font: vedana bold 16px">
<img alt="downloadin g" src="images/loadingAnimatio n.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.sty le.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**@markNOSPA Mrae.netwrote in message
news:en******** ******@TK2MSFTN GP06.phx.gbl...
"John Kotuby" <jk*******@comc ast.netwrote in message
news:eW******** ******@TK2MSFTN GP02.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*******@comc ast.netwrote in message
news:uu******** ******@TK2MSFTN GP04.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.sty le.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="javas cript">
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.co mwrote in message
news:es******** *****@TK2MSFTNG P06.phx.gbl...
John Kotuby wrote:
>Can anyone tell me why this doesn't work in FireFox?
><script type="text/jscript" language="javas cript">

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.sty le.display = "none";
or
theWaitCell.sty le.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
3572
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 referenced in the script so I presume that Firefox needs to be added somewhere -- does anyone know how I could update this to be supported by Firefox? Thanks! <SCRIPT TYPE="text/JavaScript">
4
5108
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 if I do not enter anything in the form in IE, then form won't be submitted but in other browsers it is submitted. I checked that JavaScript is enabled in Netscape, Opera, Mozilla, Firefox,
45
4748
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
11415
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
1848
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 works great but has some limits. Ok, this is what i've done (apart from the basic implementation that should be done): protected override void OnPreRender(EventArgs e)
23
5383
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 (Firefox) .... http://localhost/test3.php The script generates the following link using the echo statement ...
1
4181
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 onreadystatechange to another function of mine. onreadystatechange checks the ready state and if the ready state is 4 and the status is 200 it assigns to the innerHTML of a div. I also have some code that uses the attachEvent method so that all...
8
5965
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 HTML 4.01 Transitional//EN"which was already there when i first started. Everything is find on internet explorer. Can someone help me? My site is http://symbolsclan.co.nr/ I use micosoft frontpage to edit and create my website. thks in advance.
0
751
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 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...
0
9454
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10102
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9910
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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
3
2850
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.