Results 1 to 3 of 3

Thread: Javascript does not run

  1. #1
    Join Date
    Aug 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Javascript does not run

    1) Script Title: Ultimate Fade-In Slideshow (v1.51)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm

    3) Describe problem:
    I copied the code exactly as the instructions said to. Then modified the fadeimages lists to use my pictures. Tested it locally and all worked fine.

    However, when I post it to my host it does not run.
    http://www.hemifoundation.org/fading2.html

    I used to get an error about "line 1, char 1, object expected" but that is not happening any more... It just does not show the slide show or any of the pictures.

    I contacted support on my hosting service and they at first said it was a setting on my brower and couldn't help. Then another time they told me it was probably a problem with the script and to contact the script creator However, if I host it on a different domain at a different hosting service it does run. So, it is something specific about my host.

    Has anyone had this problem? and how do I go about trying to fix it?

    thank you

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Somehow, most likely during either the editing or uploading process, all line breaks have been stripped from page's source code. Generally this will not harm HTML code (it might cause some minor changes in spacing in the layout), but for javascript (depending upon how it is written), most line breaks must remain intact. Even javascript code written with all the proper end line markers (many DD and other scripts skip these, as they are usually 'understood' at a physical line break), if it contains end line type comments and/or certain types of preface tokens to prevent browsers from interpreting it incorrectly, it must at least preserve the physical line breaks after those unless they are removed. End line type comments can be replaced by inline type comments, but the tokens I alluded to must be removed, and this can cause problems if they were actually required.

    However, with this particular script - it would need much more than a tokens removal (if any, I don't think this script has any) and a comment type change because many of the end line markers are missing (as I outlined above can be done in javascript code).

    The easiest solution would be to start over and make sure that the physical line breaks in the script are preserved.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank you, I noticed too that the line breaks were missing, dont know how, and didnt know it would be a problem.

    I have been futzing with this for so long now I dont know anything anymore.

    I did start over (for the upteenth time) and this time it seems to be working. (Knock on wood!!)

    Thanks for your help!

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
  •