Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 18th, 2004, 04:03 AM
Authorized User
 
Join Date: Jun 2003
Location: Stockton, CA, USA.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default event handling in Netscape and Mac

My website www.finehomemadesoap.com functions properly in IE, but not Netscape and Mac. I have condensed a basic structure in which function refreshNavBar() is not called, although the onload event does trigger, as evidenced by the display of "hello."

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Fine_Homemade_Soap</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script language="JScript" type="text/jscript">
    function refreshNavBar(){
        alert('hello from inside function');
    }
</script>


</head>
    <frameset rows="240,*" frameborder="NO" border="0" framespacing="0" onload="alert('hello');refreshNavBar()">
        <frame src="ShoppingCartEmpty.asp" name="leftBottomFrame" noresize>
        <frame src="thankyou.asp" name="rightBottomFrame">
    </frameset>
<noframes><body>
</body></noframes>
</html>

Thank you,
Daniel Hutchins
Woodbridge, CA
http://www.finehomemadesoap.com
__________________
Daniel Hutchins
Stockton, CA
http://www.finehomemadesoap.com
 
Old March 18th, 2004, 04:14 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Other browsers don't understand JScript, but JavaScript. JScript is the name Microsoft gave to their implementation of JavaScript, and calling it by that name will only work in IE. Change the <script> tags to this:

<script language="JavaScript" type="text/javascript">


Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 20th, 2004, 02:21 PM
Authorized User
 
Join Date: Jun 2003
Location: Stockton, CA, USA.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Imar.

Thank you,
Daniel Hutchins
Woodbridge, CA
http://www.finehomemadesoap.com




Similar Threads
Thread Thread Starter Forum Replies Last Post
Event Handling Apocolypse2005 Visual Basic 2005 Basics 1 March 10th, 2009 07:14 AM
Event Handling C# 2.0 AccessAasif@aol.com C# 2005 2 January 25th, 2008 11:37 AM
Event handling in c# bhavna VS.NET 2002/2003 1 March 7th, 2007 12:19 PM
Event handling in c# bhavna General .NET 1 March 7th, 2007 05:32 AM
Help with Event handling nulogix Java GUI 1 October 11th, 2004 03:55 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.