473,770 Members | 3,398 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why doesn't this work in Netscape?

This code is supposed to work in Netscape 4+ and IE 4+. It works fine in IE
but in Netscape 7.2, I get a blank page. Any suggestions?

Thanks,
Brett
<html>
<head>

<script language="JavaS cript"><!--
rowArray = new Array();
rowArray[1] = '<form>Row 1: <input type="button" value="Reveal"
onClick="clicke d(2)"><\/form>';
rowArray[2] = 'This is some text for row 1';
rowArray[3] = '<form>Row 3: <input type="button" value="Reveal"
onClick="clicke d(4)"><\/form>';
rowArray[4] = 'Row 4 when clicked reveals this text';
rowArray[5] = '<form>Row 5: <input type="button" value="Reveal"
onClick="clicke d(6)"><\/form>';
rowArray[6] = 'Contents of the last row';

viewArray = new Array();
viewArray[1] = viewArray[3] = viewArray[5] = true;
viewArray[2] = viewArray[4] = viewArray[6] = false;

function refreshTable() {

var output = '<table border="1" width="500">';
for (var i = 1; i <= rowArray.length ; i++) {
if (viewArray[i])
output += '<tr><td>' + rowArray[i] + '<\/td><\/tr>';
}
output += '<\/table>';

if (document.all)
document.all('m yTable').innerH TML = output;
else if (document.layer s) {
document.layers['myTable'].document.open( );
document.layers['myTable'].document.write ln(output);
document.layers['myTable'].document.close ();
}
}

function clicked(x) {
viewArray[x] = !viewArray[x];
refreshTable();
}
//--></script>

</head>

<body onLoad="javascr ipt:refreshTabl e();">
<span id="myTable" style="position :absolute"></span>
</body>
</html>
Jul 23 '05
10 1569
Randy Webb wrote:
"All others are dead ducks"

And that is patently false, hence my "No, and No.", just as much as
saying "document.a ll is for MSIE" is patently false. To me that says its
for MSIE only, when its not. And for years the assumption by people that
didn't know any different was something along these lines:
I tend to keep answers short and simple. That is (usually) why people
ask short and simple questions. Yes, as I said, others will *use* them
but that it not what they were created *for*, which was what I
addressed. Your assumption is reasonable and true, but is neither what I
said nor what I inteded to say.
That code is *very* simple to make work in "modern" browsers using
document.getEle mentById, and quite trivially at that.


I agree again.
Jul 23 '05 #11

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

Similar topics

7
4892
by: AnnMarie | last post by:
My JavaScript Form Validation doesn't work at all in Netscape, but it works fine in IE. I made some of the suggested changes which enabled it to work in IE. I couldn't make all the changes because then it didn't work in IE. How can I enable this javascipt form validation to work in Netscape? When I use netscape, none of the alert boxes appear. It submits the form without validating anything.
3
1400
by: Jeff Wisnia | last post by:
I'd enjoy learning why this piece of javascript code which I cribbed a couple of years ago (It creates a trail of bubbles following the mouse pointer.) works fine in IE 6.0 and Netscape 4.79, but doesn't do its thing when under Netscape 7.1? I've viewed javascript "test pages" on Netscape 7.1, and they seem to work ok, so I'm presuming there's something obsolete about the code in this page of mine: ...
13
2082
by: AMC | last post by:
Hi, I have the below code in an asp page. When I run this page in IE or Opera it correctly displays the header info and does not redirect me to 'test.html'. However, when I run this in Netscape it goes straight to the redirect page 'test.html' which indicates that javascript is not enabled and it also does not display the header info. Can someone tell me why this is happening? <%@ Language=VBScript%> <%'get header info
3
25320
by: Matt | last post by:
I want to know if readOnly attribute doesn't work for drop down list? If I try disabled attribute, it works fine for drop down list. When I try text box, it works fine for both disabled and readOnly attribute. For example, #1 will work, but #2 doesn't work 1) <SELECT name="streetDirection" class="FormInput" DISABLED> In JavaScript, I have InputForm.streetDirection.disabled = false; 2) <SELECT name="streetDirection" class="FormInput"...
1
1029
by: Mr. x | last post by:
Hello, I am using the dotnet validators one of them is requiredFieldValidator. Is there any reason, that requiredFieldValidator won't work for Netscape ? (I have netscape 7.0, and it seems that requiredFieldValidator doesn't work for netscape, because I have test this for IE. even this is run on the server side).
0
10228
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10057
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...
0
9869
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
8883
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
7415
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
6676
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3970
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
2816
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.