Results 1 to 7 of 7

Thread: Help with ultimate slideshow

  1. #1
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default Help with ultimate slideshow

    1) Script Title: Ultimate Slide Show

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

    3) Describe problem:
    error: fadeshow is not defined

    Code:
    <script src="/js/ultimate.js" type="text/javascript">
    </script>
    is the correct location to the slideshow script.

    Code:
    <script type="text/javascript">
    var vutekSlides = new Array();
    vutekSlides[1] = ["/images/dashboard/150.jpg","",""];
    vutekSlides[2] = ["/images/dashboard/200.jpg","",""];
    vutekSlides[3] = ["/images/dashboard/3360.jpg","",""];
    vutekSlides[4] = ["/images/dashboard/3200","",""];
    vutekSlides[5] = ["/images/dashboard/5330.jpg","",""];
    
    new fadeshow(vutekSlides, 300, 164, 0, 3000, 1);
    </script>
    The above code is where the slideshow is supposed to show up. I am dynamically writing the array from a database which is why it is why I took it out of the regular script, the output shown above.
    For the sake of trying to get it working I also tried using and exact demo of your script but it still gives me fadeshow undefined.

    The image urls and the url to the script are both correct, and double checked.
    Unfortunately the site is password protected due to proprietary information, however I can give you a temp name / password if you would like.

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I am not experiencing this issue on the demo page (the one you linked to), and also not on another test page I created. Do you have a link to your problem page so that we can see what's going on with it?
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Yes I do but it is password protected, which I put in the post. I will PM you now with the credentials.

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

    Your page is in violation of Dynamic Drive's usage terms, which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.


    The main script creates fadeshow:

    Code:
          
    /***********************************************
    * Ultimate Fade-In Slideshow (v1.51):  Dynamic Drive (http://www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit http://www.dynamicdrive.com/ for this script and 100s more.
    ***********************************************/
     
    var fadeimages=new Array()
    //SET IMAGE PATHS. Extend or contract array as needed
    fadeimages[0]=["photo1.jpg", "", ""] //plain image syntax
    fadeimages[1]=["pho . . .
    
     . . . olor="white"
    
    ////NO need to edit beyond here/////////////
     
    var fadearray=new Array() //array to cache fadeshow instances
    var fadeclear=new Array() //array to cache corresponding clearinterval pointers
     
    var dom=(document.getElementById) //modern dom browsers
    var iebrowser=document.all
     
    function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
    this.pausecheck=pause
    this.mouseovercheck=0
    this.delay=delay
    this.degree=10 / . . .
    If fadeshow is not defined, the script is missing or there is a syntax error.

    I see you are using the main script externally, make sure you are following these guidelines:

    Use a text editor to save the script, call it 'file_name.js' where 'file_name' can be any valid file name of your choosing. Substitute the name of your external .js file for some.js in the below:

    HTML Code:
    <script src="some.js" type="text/javascript"></script>
    Common problems arise when:

    1 ) The script file is not in the directory specified. In the above example it must be in the same directory as the page(s) that use it. Below, it can be in the scripts directory off of the root of a domain:

    HTML Code:
    <script src="http://www.somedomain.com/scripts/some.js" type="text/javascript"></script>
    2 ) Opening, closing and/or 'hiding' tags are left in the external file. This means that you must strip:
    Code:
    <script>
    <!--
    and
    Code:
    //-->
    </script>
    and any of their many variations from the beginning and end of the external file.

    3 ) The external call (<script src="some.js" type="text/javascript"></script>) is not inserted into the page at the correct spot. The external call must be inserted at the same place on the page where the script was/would have been.

    4 ) Paths to other files (if) used by the script are no longer valid due to its location. This is only a problem if the external script is kept in a different directory than the page it was working on when it was an internal script. To correct this, use absolute paths inside the script. Absolute path examples:

    Code:
    http://www.somedomain.com/images/button.gif
    
    http://www.somedomain.com/~mysitename/index.html
    5 ) Inappropriately combining two or more scripts into one external file. Usually external scripts can be combined if one knows enough about scripting to do so properly. Even then it is possible to overlook something.

    A rule of thumb when testing is, if it won't work on the page, it won't work as an external file either.

    One other thing, if this is a DD script or any script that requires the credit remain for legal use, include the credit in the on page call, ex:

    HTML Code:
    <script src="some.js" type="text/javascript">
    /***********************************************
    * IFrame SSI script II-  Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
    * Visit DynamicDrive.com for hundreds of original DHTML scripts
    * This notice must stay intact for legal use
    ***********************************************/
    </script>
    Make sure to retain all the 'decorations', as these include begin and end javascript comment delimiters, without which the script won't function.

    There is also info here:

    http://www.javascriptkit.com/javatutors/external.shtml
    - John
    ________________________

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

  5. #5
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    John how can you tell its in violation? you dont even know the website? I copied directly from the demo page.

    In any event I copied the disclaimer to the physical location...

    Code:
    <script type="text/javascript">
    <!--
    /***********************************************
    * Ultimate Fade-In Slideshow (v1.51): � Dynamic Drive (http://www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit http://www.dynamicdrive.com/ for this script and 100s more.
    ***********************************************/
    var vutekSlides = new Array();
    vutekSlides[0] = ["/images/dashboard/5330.jpg","",""];
    vutekSlides[1] = ["/images/dashboard/150.jpg","",""];
    vutekSlides[2] = ["/images/dashboard/200.jpg","",""];
    vutekSlides[3] = ["/images/dashboard/3360.jpg","",""];
    vutekSlides[4] = ["/images/dashboard/3200","",""];
    new fadeshow(vutekSlides, 300, 164, 0, 3000, 1);
    // -->
    </script>
    Thanks for your help testing


    Sorry for the violation :-? ... does that fix it?

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

    I just took you literally when you said you had:

    Quote Originally Posted by boogyman View Post
    Code:
    <script src="/js/ultimate.js" type="text/javascript">
    </script>
    Code:
    <script type="text/javascript">
    var vutekSlides = new Array();
    vutekSlides[1] = ["/images/dashboard/150.jpg","",""];
    vutekSlides[2] = ["/images/dashboard/200.jpg","",""];
    vutekSlides[3] = ["/images/dashboard/3360.jpg","",""];
    vutekSlides[4] = ["/images/dashboard/3200","",""];
    vutekSlides[5] = ["/images/dashboard/5330.jpg","",""];
    
    new fadeshow(vutekSlides, 300, 164, 0, 3000, 1);
    </script>
    The credit should go here:

    Code:
    <script src="/js/ultimate.js" type="text/javascript">
          
    /***********************************************
    * Ultimate Fade-In Slideshow (v1.51):  Dynamic Drive (http://www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit http://www.dynamicdrive.com/ for this script and 100s more.
    ***********************************************/
    
    </script>
    But where you have it is acceptable.

    Any luck fixing the problem yet?
    - John
    ________________________

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

  7. #7
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Any luck fixing the problem yet?
    Yes, the problem was due to a couple of things. First being the <script> tags and comment tags in the js file (causing the fadeshow function not to exist). Second being the slideshow array started with a 1 instead of a 0 (thus throwing out an error saying theimages[p] is not defined). Fixed those items and the slideshow worked perfectly.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

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
  •