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

Discussion in 'Javascript' started by Sébastien de Mapias, Oct 5, 2009.

  1. 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
     
    Sébastien de Mapias, Oct 5, 2009
    #1
    1. Advertising

  2. Sébastien de Mapias

    Bart Lateur Guest

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

    Sébastien de Mapias wrote:

    >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.

    --
    Bart.
     
    Bart Lateur, Oct 5, 2009
    #2
    1. Advertising

  3. Re: "'func' is not defined" in Firefox when whole local path to srcis specified in my page

    On 5 oct, 11:22, Bart Lateur <> wrote:
    > 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
     
    Sébastien de Mapias, Oct 5, 2009
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Richter

    <txt src= ...> equivalent of <img src= ...>

    Steve Richter, Feb 8, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    2,113
    Laurent Bugnion
    Feb 9, 2006
  2. Greg Johnson
    Replies:
    4
    Views:
    3,098
  3. \A_Michigan_User\
    Replies:
    2
    Views:
    909
    \A_Michigan_User\
    Aug 21, 2006
  4. Replies:
    1
    Views:
    1,629
    Alex Hunsley
    Mar 23, 2007
  5. pheadxdll
    Replies:
    16
    Views:
    3,708
    Neredbojias
    Jun 6, 2007
Loading...

Share This Page