Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8

Thread: Simple Problem

  1. #1
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Simple Problem

    Hi all,

    I'm pretty new to javascript coding and was trying to make a fading image slideshow. i have found one on dynamicdrive modified it, all looks fine. The first image shows and thats it. doesnt go through the photos :/ probably something simple but i cant work it out, any thoughts?

    EDIT:
    Code:
    <head>
    <script language="javascript1.1">
    var mygallery=new fadeSlideShow({
    	wrapperid: "column2", 
    	dimensions: [250, 180], 
    	imagearray: [
    		["images/img1.png"],
    		["images/img2.png"],
    		["images/img3.jpg"]
    	],
    	displaymode: {type:'auto', pause:2500, cycles: 10, wraparound:false},
    	persist: false, 
    	fadeduration: 500, 
    	descreveal: "ondemand",
    	togglerid: ""
    })
    </script>
    </head>
    <body>
    <div id="column2"><a href="#" class="next"><img src="images/img1.png" name="slide" id="rounded-image" height="288" border="0" style="filter:blendTrans(duration=3)" alt="image-1"/></a></div>
    </body>
    Thanks,
    Storm08
    Last edited by Storm08; 10-11-2011 at 03:19 PM.

  • #2
    Regular Coder
    Join Date
    Mar 2008
    Location
    London
    Posts
    152
    Thanks
    4
    Thanked 42 Times in 42 Posts
    please provide your piece of code....

  • Users who have thanked niralsoni for this post:

    Storm08 (10-11-2011)

  • #3
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks for the reply, ive put the code in the last post. sorry! :P

  • #4
    New Coder
    Join Date
    Sep 2011
    Location
    Braintree, Massachusetts
    Posts
    48
    Thanks
    1
    Thanked 0 Times in 0 Posts
    correct me if i'm wrong, but i think the problem rests in that your javascript only recalls one single image, thus only showing One image. you need to be able to call more than one image.

    Code:
    <div id="column2"><a href="#" class="next"><img src="images/img1.png" name="slide" id="rounded-image" height="288" border="0" style="filter:blendTrans(duration=3)" alt="image-1"/></a></div>
    </body>
    first, try using div class instead of div id since you're trying to call more than one item.

    That is the problem I'd think. Javascript is only looking at img1.png as the only image to 'call'. Try adding all of the images.


    OR it might be that you have to use a call function in a similar manner as this to call ALL of your images within that one div.

    Code:
    <body onload="someFunction();otherFunction();">
    
    or, say, in a mouseover...
    
    onMouseOver="someFunction();otherFunction();"
    
    In JavaScript, the semi-colon is essentially an end-of-line marker.  Within reasonable limits, you can actually write a whole script inside of an event handler.
    
    The same thing applies to the href="javascript:etc" structure.  For instance:
    
    <a href="javascript:someFunction();otherFunction();">
    Click Here
    </a>
    Hopefully that helps. I'm a beginner myself, but that might be the workaround/code you're looking for.

  • #5
    Regular Coder
    Join Date
    Mar 2008
    Location
    London
    Posts
    152
    Thanks
    4
    Thanked 42 Times in 42 Posts
    i tried downloading the script from dynamicdrive, and added your piece of code there, it worked perfectly.

    have you added proper DOCTYPE in your code (as indicated in the dynamicdrive link )??

  • #6
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    Ummmm...the dynamic drive library function is *NOT* there in your first post.

    If that's your actual entire web page, of course it does nothing at all.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #7
    Regular Coder
    Join Date
    Nov 2009
    Posts
    247
    Thanks
    4
    Thanked 22 Times in 22 Posts
    Storm08:

    See, my application here or here.

    Multiple Fading Slideshows.

  • #8
    New Coder
    Join Date
    Sep 2011
    Location
    3830 Valley Center, San diego
    Posts
    17
    Thanks
    0
    Thanked 1 Time in 1 Post

    Thumbs up

    Hi guys,

    Many many thanks to sharing yours "Java-script coding and was trying to make a fading image slide-show" information, I am highly appreciated!!

    Best advance
    Chrish Hardwick


  •  

    Posting Permissions

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