[Javascript] alert message proble with Netscape

William T. Simmons tsimmons at employmentlawadvisors.com
Wed May 8 17:48:04 CDT 2002


Steve,
I believe the problem is the reference to JavaScript 1.3. If you omit the
1.3, the code works, at least on my system (WinXP Pro, NS 6.2). I also added
a space between the button value and the "onClick" part, and deleted the
spaces between the parantheses in the function names. I hope this code
displays correctly on your e-mail client - let me know if it doesn't.
<html>
<head name="WindowPane">
<script type="text/javascript">
<!--
function displayWindowInfo() {
alert("I am in here but!");
}
-->
</script>
</head>
<body>
<form>
<input type="button" value="Display Window Information"
onClick="displayWindowInfo()">
</form>
</body>
</html>

The above code works if put into a test HTML file and opened with NS 6.2.

HTH,
Tommy Simmons
Employment Law Advisory Network
www.employmentlawadvisors.com

----- Original Message -----
From: "Steve" <extstarrfam at cox-internet.com>
To: <javascript at LaTech.edu>
Sent: Wednesday, May 08, 2002 4:19 PM
Subject: [Javascript] alert message proble with Netscape


> Does any one know why this does not work in Netscape
> 6.2?
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML4.01//EN"
>  "http://www.w3.org/TR/Rec-html4/loose.dtd">
> <html>
> <head name="WindowPane">
> <script type="text/javascript1.3">
> <!--
> function displayWindowInfo( ) {
> alert("I am in here but!");
> }
> //-->
> </script>
> </head>
> <body>
> <form>
> <input type="button" value="Display Window Information"
> onClick="displayWindowInfo( )">
> </form>
> </body>
> </html>





More information about the Javascript mailing list