Solved

calling an external javascript function "is not defined" in firefox

Posted on 2008-06-12
3
1,377 Views
Last Modified: 2012-05-05
When calling the function MiniManageCart() which is in my nopcart.js file, I get an error in Firefox error console that says MiniManageCart is not defined.  This same code works fine in IE 7... any ideas?

Below is my edited html to show the relevant parts.
<HTML>

  <HEAD>

    <SCRIPT type="text/javascript" SRC=C:\_PhotosViewing\language-en.js></SCRIPT>

    <SCRIPT type="text/javascript" SRC="C:\_PhotosViewing\nopcart.js"></SCRIPT>

  </HEAD>

  <BODY BGCOLOR=#444444 LINK=WHITE ALINK=RED VLINK=WHITE TOPMARGIN=4 LEFTMARGIN=4>

[...]

        <script>

          MiniManageCart();

        </script>

[...]

  </BODY>

</HTML>

Open in new window

0
Comment
Question by:BossTurbo
3 Comments
 
LVL 42

Accepted Solution

by:
David S. earned 500 total points
ID: 21775088
Try the following.

P.S. You're using obsolete attributes on <body> there.
    <script type="text/javascript" src="file:///C:/_PhotosViewing/language-en.js"></script>

    <script type="text/javascript" src="file:///C:/_PhotosViewing/nopcart.js"></script>

Open in new window

0
 
LVL 41

Expert Comment

by:HonorGod
ID: 21775090
Add the type attribute to your script tag:

 <script type='text/javascript'>
0
 

Author Closing Comment

by:BossTurbo
ID: 31466792
Thanks!  I knew it was something easy, but sometimes you get tunnel vision.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now