SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member timotheos's Avatar
    Join Date
    Sep 2000
    Location
    Washington D.C.
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    need Javascript Includes Debugging

    Hi I am working on a site for a client. I am trying for the first time to use Javascript Includes. I am getting some errors and I was hoping that maybe someone out there knew what was going on.

    Main site page http://www.aipb.org/beta

    Javascript Page http://www.aipb.org/beta/aipbTest.html

    JSinclude http://www.aipb.org/beta/aipbInclude.js

    Thanks for your help
    Code:
    Glory, power, wisdom and honor
    belong to our God, and his Messiah.

  2. #2
    SitePoint Member timotheos's Avatar
    Join Date
    Sep 2000
    Location
    Washington D.C.
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i found the error thanks anyway. Thanks to netscape's built in debugger. Who would have thought netscape 4.03 would still be good for something???

  3. #3
    SitePoint Enthusiast oneafrikan's Avatar
    Join Date
    Oct 1999
    Location
    London, Uk
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    hi there

    Would you mind also lettin me know what the problem was, and how you solved it?, 'cos I'm having a similar problem, but don't have NS

    Thanks millions
    Later
    /timber
    -> www.oneafrikan.com ><-><><-><-><-><-><
    -> www.openboxsoftware.com ><><-><-><-><

  4. #4
    SitePoint Member timotheos's Avatar
    Join Date
    Sep 2000
    Location
    Washington D.C.
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sure, i was missing one quote inside the javascript, the netscape debugger caught it, and it threw the functions out of whack. 1 character and it blows the whole thing up. be careful

    You can look at the site and see how it turned out.

    http://www.aipb.org/beta

  5. #5
    SitePoint Enthusiast oneafrikan's Avatar
    Join Date
    Oct 1999
    Location
    London, Uk
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thanks

    thanks - simple mistake to make but can be hell to debug!!

    the site looks pretty cool! ;-)

    but more to the point - how do you do the javascript includes? - just include another script within a javascript??

    ie
    <script1>
    <script2 src></script2>
    </script1>

    so in this case it would be a nested "script"??

    Thanks in advance
    /timber
    -> www.oneafrikan.com ><-><><-><-><-><-><
    -> www.openboxsoftware.com ><><-><-><-><

  6. #6
    SitePoint Member timotheos's Avatar
    Join Date
    Sep 2000
    Location
    Washington D.C.
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you do a script include in the header first.

    in this external .js file you define 2 functions

    writeHeader();
    writeFooter();

    and within those function you define what is going to happen within your code, it's very simple and more dynamic than html, because you can use alot of if-then statements. Also it caches the javascript file on the users hard drive, so after the first page, all the pages load quicker.

    take a look at the code, it will explain.

  7. #7
    SitePoint Enthusiast oneafrikan's Avatar
    Join Date
    Oct 1999
    Location
    London, Uk
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thanks

    cool - gotit!

    Thanks for the help!!

    keep well.
    /timber
    -> www.oneafrikan.com ><-><><-><-><-><-><
    -> www.openboxsoftware.com ><><-><-><-><


Bookmarks

Posting Permissions

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