HighDots Forums  

Re: alert() window does not work from external JS file

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: alert() window does not work from external JS file in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Randy Webb
 
Posts: n/a

Default Re: alert() window does not work from external JS file - 11-29-2007 , 04:28 AM






pnberry (AT) gmail (DOT) com said the following on 11/29/2007 3:00 AM:
Quote:
Hello,

I was doing some testing with a JavaScript file that is loaded as an
external library. I like to use alert() windows to test or see values
as I do development work but I found that when the alert() function is
used from the external library file it doesn't work. But when I moved
the same code back into the <head></head> section of my web page the
alert() windows did work. What is going on here? (I'm using firefox
2.0.0.8)
Posting PHP code to debug client side JS doesn't make a lot of sense.
What is needed is the HTML generated by the PHP code.

That said, test it in IE with an external file and if you get the error
"Illegal Character...." then it would confirm my belief that the path to
your JS file is incorrect. Barring that, post a URL to two pages, one
that works with the code in the page, and one that doesn't work with an
external file.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.