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

Netsscape fails to run the Body onload, why???

In IE, this runs fine, but in Netscape, it doesn't error, but just
doesn't run. WHY?!?!
(in the Page Code Behind)
BODY1.Attributes.Add("onLoad", "DisplayData();")
(in the HTML of the Page)
function DisplayData(){
PanelDescription.style.display = 'none';
PanelBuildingName.style.display = 'none';
PanelOperatorName.style.display = 'none';
PanelManagementName.style.display = 'none';
....(yada yada yada)

Thanks
BTHOMAS71CHEVY-at-EXCITE-dot-COM
Nov 22 '05 #1
3 1298
BTHOMASinOHIO <bt************@yahoo.com> wrote:
In IE, this runs fine, but in Netscape, it doesn't error, but just
doesn't run. WHY?!?!
(in the Page Code Behind)
BODY1.Attributes.Add("onLoad", "DisplayData();")
(in the HTML of the Page)
function DisplayData(){
PanelDescription.style.display = 'none';
PanelBuildingName.style.display = 'none';
PanelOperatorName.style.display = 'none';
PanelManagementName.style.display = 'none';
...(yada yada yada)


I suggest you see what Netscape is downloading, save that as HTML, and
then get that to work in Netscape (asking in Netscape-specific forums,
perhaps) - then make sure that's what's sent, at least if the browser
is Netscape.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 22 '05 #2
I believe the problem you are experiencing is in the DisplayData() function.
Netscape does not support referencing an element directly by ID. For example:

function DisplayData(){
PanelDescription.style.display = 'none';
...
}

I'm assuming you have a <asp:Panel ID="PanelDescription" Runat="server" />
tag, which in IE's JScript you can reference using just it's ID; however,
that will only work in IE browsers. Try changing it to the "correct" syntax
below, which will work cross-browser:

function DisplayData(){
document.getElementByID("PanelDescription").style. display = 'none';
...
}

Hope that helps.

--
Jason Whitted

Nov 22 '05 #3
Jason,

Yes, you were/are correct.

After I started plugging in "..getElementByID().." to all my
JavaScipt, things started working as planned in Netscape.

Man, I really hadn't planned on rewritting all the Javascript in my
application over Netscape, but I AM !!! :(

I have also had to do some server side validation as well as Netscape
doesn't like:

- "ValidatorEnable(RequiredFieldValidator, false);" Validation
- "Page_ClientValidate();"

Grrrr....

(THANKS !!)
Nov 22 '05 #4

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

Similar topics

1
by: Robert Oschler | last post by:
I have an frame in one of my documents (not a frameset document). The top level document has an "onload" handler in the BODY tag. I have found that if the frame is unable to navigate to the...
1
by: BTHOMASinOHIO | last post by:
In IE, this runs fine, but in Netscape, it doesn't error, but just doesn't run. WHY?!?! (in the Page Code Behind) BODY1.Attributes.Add("onLoad", "DisplayData();") (in the HTML of the...
4
by: Viken Karaguesian | last post by:
Hello all, I have a question. I trying to run two Javascripts on my webpage, both of which need a <body onload> command. They are as follows: <body onload="runMe()"> <body...
2
by: laredotornado | last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to have my Javascript function execute from the BODY's "onload" method, but if there is already an onload method defined, I would...
9
by: gleverett | last post by:
I have been searching the 'Net, and I can't find the right solution here. I am writing some PHP pages that utilize some Javascript. The script works in Mozilla/Netscape, but fails in IE. I don't...
5
by: Patient Guy | last post by:
I have this in a document: <body onload="a_function(this);"> In an (external) script file, I define a_function() as follows: function a_function(obj) { // surprise errant coding here
2
by: cgrady | last post by:
I'm working on part of a larger project, and in trying to debug one aspect, I've got a small test file to work with. The code is practically identical (all important aspects match word for word)...
20
by: Mark Anderson | last post by:
Hi, I have this in an external JS library: ///////////////////////// function addMyEvent(){ var obj; if(document.attachEvent) { obj = document.getElementsByTagName('img'); for...
3
by: zepdad | last post by:
I'm new to forum and am learning javascript. I appreciate your help and patience in advance. I run an image gallery website that uses an onload event called FitPic() to scale image and window sizes...
2
by: WGW | last post by:
Hello all, I need another set of eyes cause it just isn't working, no matter how identical I make it. The initRotator function works when called by itself, but when adding another function, only the...
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...
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
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...
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...
0
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...

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.