Results 1 to 11 of 11

Thread: Javascript problems

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Javascript problems

    Put very simply, the problem is that javascript scripts work only if I'm viewing a website (or any page from a server). It won't work if I'm viewing a page locally.

    Does anyone have any idea about this?

  2. #2
    Fanatic Member VisionIT's Avatar
    Join Date
    Nov 2002
    Location
    Workin'...
    Posts
    718
    That's wierd!

    Have you checked the HTML path to the .JS or .CLASS files in your index.htm(L) ?

    It could be still looking for it via the web, which usually wouldn't really be a problem...

    Some HTML pages check which page the file was called from (HTTP_Referer), and if you're calling it locally, the HTML would fail automatically... and not due to an error.

    Regards,

    Paul.

  3. #3
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    You sure you're not load an external JS file something like "/files/file.js" so it's looking in the wrong place?

    EDIT: Oops sorry that's what VisionIT said, sorry

  4. #4

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    No, what I mean is, any html file... the javascript part just won't work. Even something as simple as:

    Code:
    <html>
    <head>
    <title>blah</title>
    </head>
    <body onLoad="javascript:alert('hello');">
    adlkfjalfjas;lfjaflj
    </body>
    </html>
    Javascript just doesn't work locally at all.

    Now what are these .js and .class files you refer to? There are no external files involved here.

  5. #5

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Could it be a DLL problem? I don't know much about them.

  6. #6
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    Atlanta, GA
    Posts
    280
    there isn't suppose to be a space between "java script". Change that and it should work
    OrdinaryGuy

  7. #7

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by OrdinaryGuy
    there isn't suppose to be a space between "java script". Change that and it should work
    The space gets put in there itself when I'm posting that code.

    Yash... it's not a problem of coding. I'm talking about any javascript. ANY javascript in ANY html file, it won't execute locally.

  8. #8
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Using IE, right? Check your security setting for Trusted Sites or Local Intranet or whatever zone IE puts the local filesystem into for disabled scripting.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  9. #9
    Fanatic Member VisionIT's Avatar
    Join Date
    Nov 2002
    Location
    Workin'...
    Posts
    718
    Quickest option...

    Download the new JavaSDK from MS.

    Regards,

    Paul.

  10. #10
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Mendhak, can you run JScript thru WSH (or ASP if you have IIS installed)?
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  11. #11

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by JoshT
    Mendhak, can you run JScript thru WSH (or ASP if you have IIS installed)?
    eh? Didn't understand that...

    I can run Javascript only when viewing a web page from the server. So this means instead of C:/inetpub/wwwroot/index.html, I have to do http://localhost/index.html for the javascript to work... I have PWS.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width