"'func' is not defined" in Firefox when whole local path to src isspecified in my page

  • Thread starter Sébastien de Mapias
  • Start date
S

Sébastien de Mapias

Hi,

The following page
<html>
<script src="d:\temp\aa\stuff.js" type="text/javascript"></script>
<a href="#null" onclick="stuffAlert();">Click here !</a>
</html>
does not work with Firefox (the script stuff.js contains a 'stuffAlert
()'
function which only consists in "alert('test');"), yet works OK with
IE or Chrome. Obviously Firefox does not like you to mess with
locally defined script does it ? (if I remove "d:\temp\" in the src
it works OK -my html page is located in d:\temp-)

Is there a way to have Firefox behave just like IE or Chrome ?

Thanks.
Regards,
Seb
 
B

Bart Lateur

Sébastien de Mapias said:
The following page
<html>
<script src="d:\temp\aa\stuff.js" type="text/javascript"></script>
<a href="#null" onclick="stuffAlert();">Click here !</a>
</html>
does not work with Firefox (the script stuff.js contains a 'stuffAlert
()'
function which only consists in "alert('test');"), yet works OK with
IE or Chrome. Obviously Firefox does not like you to mess with
locally defined script does it ? (if I remove "d:\temp\" in the src
it works OK -my html page is located in d:\temp-)

Is there a way to have Firefox behave just like IE or Chrome ?

I suspect the "URL" of your script is what is bothering Firefox. Try
making it a "file:" URL.
 
S

Sébastien de Mapias

I suspect the "URL" of your script is what is bothering Firefox. Try
making it a "file:" URL.

Inderdaad ! Nu werkt dat perfekt. Bedankt.
Seb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top