Results 1 to 3 of 3

Thread: Ultimate Fade in - unnecessary space under it

  1. #1
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ultimate Fade in - unnecessary space under it

    1) Script Title: Ultimate Fade in

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


    3) Describe problem: I'm new and this may have been answered earlier but I can't find it. The fade in fade out works beautifully. However, in Dreamweaver I get a wide gap between the bottom of the fade in fade out material and any material I'd like to put directly under this. I'm trying to use the fade in fade out in a type of header for the page. See it at: http://www.acdaonline.org/states/WA/newindex.htm
    I can't get my menu buttons to fit in a table directly under the fade in/out material. There seems to be no extraneous code in DW causing the gap. Is there another answer to this?
    JimHo

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,070
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    This, or something very similar to it happened at least once before that I know of. Understandable since you say you are new, especially if by that you mean new to javascript.

    Your gap is the result of a series of errors, at least two errors. I've thought the demo page could be clearer about just the sorts of things that could lead to this situation. I don't run the site though and am not affiliated in any way with Dynamic Drive other than as a contributor of sorts. I have little input into how the demo pages are. I do have a bit more on those pages that showcase my scripts but, Ufade is just one on which I collaborated, not authored.

    More than you needed to know. OK, here is where you went wrong. This script is capable of multiple slide shows per page and the demo which you tried to faithfully copy was set up to showcase two slide shows on one page. I don't think you fully realized this.

    No matter, either way you have two arrays (fadeimages and fadeimages2), even though the second one has no elements (it has listed below it a restating of the the first array's elements):

    Code:
    var fadeimages=new Array()
    //SET IMAGE PATHS. Extend or contract array as needed
    fadeimages[0]=["banners/scenery.jpg", "", ""] //plain image syntax
    fadeimages[1]=["banners/choirs.jpg", "", ""] //plain image syntax
    fadeimages[2]=["banners/conductors.jpg", "", ""] //plain image syntax
    fadeimages[3]=["banners/leaders.jpg", "", ""] //plain image syntax 
    
    var fadeimages2=new Array() //2nd array set example. Remove or add more sets as needed.
    //SET IMAGE PATHS. Extend or contract array as needed
    fadeimages[0]=["banners/scenery.jpg", "", ""] //plain image syntax
    fadeimages[1]=["banners/choirs.jpg", "", ""] //plain image syntax
    fadeimages[2]=["banners/conductors.jpg", "", ""] //plain image syntax
    fadeimages[3]=["banners/leaders.jpg", "", ""] //plain image syntax 
    But, since you only have one show on your page, you didn't even need this second array (red). The restating of the first array's elements (green) is just superfluous - changes nothing. So, you can just get rid of all of it (red and green).

    Almost done. Remember what I said about there being two slide shows in the demo, well you have kept the two calls for them in the body:

    Code:
    <script type="text/javascript">
    //new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
    new fadeshow(fadeimages, 760, 155, 0, 3000, 1, "R")
    new fadeshow(fadeimages2, 760, 155, 0, 3000, 0)
     
    </script>
    Remove the second (red) one. It is what is essentially (in combination with the empty fadeimages2 array) causing your gap (a gap of about 155 pixels, its configured, but empty height).
    - John
    ________________________

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

  3. #3
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thanks, John.

    Thank you for the quick and totally accurate fix for my error.
    It makes complete sense...
    I'm just discovering the script and forum world. You people are great!
    JimHo

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
  •