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 13 of 13

Thread: Slide show

  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Montreal
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SLide show

    Hi everybody,

    I checked the scripts enumerated in this wite and I am at a loss. I have difficulty selecting the appropriate script.

    I need a simple slide-show script that will work on PC & Mac, with most of the browsers. The one I am using now is OK on PC but not on a Mac.
    I should be able to show a picture, and 4-5 lines for the credits, plus forward-backward buttons.

    Please, if anybody can direct me toward this target

    Thanking you in advance
    Hrisula

    PS I just love the one I am using now, any chance that it can be modified to accomodate Mac users?

  • #2
    Regular Coder
    Join Date
    Aug 2003
    Location
    Loughborough University
    Posts
    427
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Slideshows? I've got about a million of them. Take your pick, there's at least one in there that closely matches your discription, it's called "Complex Slideshow.html" I think.
    Attached Files Attached Files
    AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
    BFG GeForce 6800 Ultra OC 256Mb
    3 * Kingston 256Mb PC3200 DDR400
    Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150

  • #3
    New Coder
    Join Date
    Jun 2002
    Location
    Montreal
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you so much!!

    Yes, I like the complex slideshow. I would like though to include the credits, say 5 lines of short text just next to the image.
    The final output should look like a table with 2 adjacent cells, one containg the picture and one containing the text.
    How will I do that, again it should work on a Mac?
    (I use a PC, I do not have access to a Mac)

  • #4
    Regular Coder
    Join Date
    Aug 2003
    Location
    Loughborough University
    Posts
    427
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ignore this.
    AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
    BFG GeForce 6800 Ultra OC 256Mb
    3 * Kingston 256Mb PC3200 DDR400
    Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150

  • #5
    Regular Coder
    Join Date
    Aug 2003
    Location
    Loughborough University
    Posts
    427
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I personally try to never use tables as CSS has moved in to replace most/all formatting of content that HTML used to do.

    However since you asked for an example with tables, I have provided one. Just include \n in the text for the image to create a new line.
    Attached Files Attached Files
    AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
    BFG GeForce 6800 Ultra OC 256Mb
    3 * Kingston 256Mb PC3200 DDR400
    Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150

  • #6
    New Coder
    Join Date
    Jun 2002
    Location
    Montreal
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, that's it!!!
    Thank you so much, I can use this to eliminate my Mac problems.

    Just for the record, if you have a few minutes, can you please just take a look at this address: http://pages.infinit.net/zeus/gallery/
    This is the script that I am using presently, which is fine for Windows
    But why this script does not work with Mac, what is the problem with it? What is the culprit?

  • #7
    Regular Coder
    Join Date
    Aug 2003
    Location
    Loughborough University
    Posts
    427
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's hard to say what's preventing it from working because I don't have a mac.

    I can suggest things that may cause problems, however it does depend what Internet browser you are using, it may not work if you are using an older browser.

    These could be the troublesome areas:

    You have not declared your variables.

    You have not declared your arrays (more serious).

    This:

    if(direction=="next")
    {thisPic++}
    if(direction=="prev")
    {thisPic--}

    should be:

    if(direction=="next")
    {thisPic++}
    else if(direction=="prev")
    {thisPic--}

    and if it were me I would reduce it to this:

    thisPic+=(direction=="next")?1:(-1);

    although it wouldn't much difference.

    Another point, there is an if statement encompassing the entire contents of the function:

    function chgSlide(direction) {
    if (document.images) {

    ...

    }
    }

    It could be that in your mac browser comes up false for document.images and so the contents in the if are not run.

    Final point, I found this:

    if(document.getElementById)
    {document.getElementById("pcredit").innerHTML=Credits[thisPic]}

    It could be that your mac browser doesn't support innerHTML, but this would only affect the credits.

    Failing that I don't know what could be causing the problem, especially as I don't have a mac to test on and since there isn't much more script that could go wrong.

    I have uploaded a modified version of your script, it does the same job as your original script and has all the same variable names but it is slightly modified and so should work for more browsers:
    Attached Files Attached Files
    Last edited by lavalamp; 09-26-2003 at 07:00 PM.
    AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
    BFG GeForce 6800 Ultra OC 256Mb
    3 * Kingston 256Mb PC3200 DDR400
    Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150

  • #8
    New Coder
    Join Date
    Jun 2002
    Location
    Montreal
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks a million!!!
    I sure appreciate your input, I will have to be more careful.

    Since I am on a roll, learning....
    one final question..

    You said that you avoid usually tables, prefering to use CSS...
    Why??

    Supposing that you wanted to center a picture and/or a text vertically AND horizontally, in the exact center of the screen, whatever the resolution whatever the size of the screen, how would you do that with CSS? I usually do it with javascript, is there a simpler way?

  • #9
    Regular Coder
    Join Date
    Aug 2003
    Location
    Loughborough University
    Posts
    427
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't use tables for layout because the W3C say that you shouldn't. I'm a good little coder and always do what they tell me.

    I realise that CSS can't completely replace tables but it can do many more things than them as well. I think that if you wanted to put something in the centre of the screen you could do this:

    <div style="width:100px;height:100px;position:absolute;top:50%;left:50%;margin:-50px 0 0 -50px;vertical-align:middle;text-align:center;">Hello</div>

    That should centre the div and also the content inside the div.
    AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
    BFG GeForce 6800 Ultra OC 256Mb
    3 * Kingston 256Mb PC3200 DDR400
    Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150

  • #10
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #11
    New Coder
    Join Date
    Jun 2002
    Location
    Montreal
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you both Lavalamp and Liorean.

    I sure appreciate the input and the resources. I have learned a few new things today.

    Hrisula

  • #12
    Regular Coder
    Join Date
    Aug 2003
    Location
    Loughborough University
    Posts
    427
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Happy to help.
    AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
    BFG GeForce 6800 Ultra OC 256Mb
    3 * Kingston 256Mb PC3200 DDR400
    Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150

  • #13
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Originally posted by hrisula
    I have learned a few new things today.
    Well, they say life is a learning experience, and a day where you have learned something is a day that's not gone to waste. (Can't think of any more proverbials about learning at the moment...)

    Always happy to help!
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards


  •  

    Posting Permissions

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