Results 1 to 2 of 2

Thread: My javascript codes won't do anything.. even when copied from a tutorial. Help?

  1. #1
    Join Date
    Sep 2009
    Posts
    7

    My javascript codes won't do anything.. even when copied from a tutorial. Help?

    So I'm attempting to learn javascript using libraries and stuff, mostly along the ajax lines. Being that I'm teaching myself, I'm using tutorials. This code is something copied from a tutorial directly to my page:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <title>Untitled document</title>
    <script src="/javascripts/prototype.js" type="text/javascript"></script>
    <script src="/javascripts/scriptaculous.js" type="text/javascript"></script>
    </head>
    <body>
    <div onclick="$(this).switchOff()">Click here if you've seen enough.</div>
    </body>
    </html>
    The javascript libraries are in my hosting folder /test/javascripts/ and this html file is in /test/ajaxtest.html

    The page is http://www.screamdigitalmedia.com/test/ajaxtest.html

    Any guidance would be amazing.

  2. #2
    Join Date
    Jan 2010
    Location
    Nanning,Guangxi,China
    Posts
    5
    you can try a firefox plugin named Firebug to find out what is goes wrong

Similar Threads

  1. JavaScript Tutorial - set mouse pointer position?
    By web88js in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 07 May 2007, 01:30 AM

Posting Permissions

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