Results 1 to 6 of 6

Thread: Conveyor belt slideshow script

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

    Default Conveyor belt slideshow script

    1) Script Title: Conveyor belt slideshow script

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

    See application here: http://www.ihlbooks.com/index.html

    3) Describe problem: There are two issues.

    The first one is that when I tried to attach a javascript to the link attached to each book cover that's showing on the conveyor belt, nothing shows up at all. So I fell back on a regular link, but all it does is send the visitor to the corresponding page rather than have the link trigger a popup window and keep the main page in view.

    In other words, instead of

    Code:
    leftrightslide[0]='<a href="http://www.ihlbooks.com/books/freedomsbattle.html"><img src="http://www.ihlbooks.com/images/freedomsbattle.jpg" border=0></a>'
    I'd like to have

    Code:
    leftrightslide[0]='<a href="javascript:popupWindow('http://www.ihlbooks.com/books/freedomsbattle.html')"><img src="http://www.ihlbooks.com/images/freedomsbattle.jpg" border=0></a>'
    but that doesn't seem to work. Obviously I am making a serious mistake here, but I don't know enough to figure out what.

    Anyone has an idea on whether what I would like to achieve is even possible?

    The second problem is that with the current setup, every time I come back to the main page, the conveyor belt starts anew from the beginning instead of picking up where it left off when a book cover was clicked on. Can this be fixed?

    Thanks for any help.

    J.J.
    Last edited by jscheuer1; 12-01-2008 at 08:21 AM. Reason: format code

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Quote Originally Posted by jjs110 View Post
    leftrightslide[0]='<a href="javascriptopupWindow('http://www.ihlbooks.com/books/freedomsbattle.html')"><img src="http://www.ihlbooks.com/images/freedomsbattle.jpg" border=0></a>'
    This can be achieved by this:
    Code:
    leftrightslide[0]='<a href="http://www.ihlbooks.com/books/freedomsbattle.html" target="_blank"><img src="http://www.ihlbooks.com/images/freedomsbattle.jpg" border=0></a>'
    That should also solve your second problems since it is dependent on the "current setup".
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

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

    As long as your popupWindow() function will work on a regular link you can actually do it the way you want, but proper syntax as regards nested delimiters (in this case the single quote ' character) must be followed. They need to be escaped with the down slash (\):

    Code:
    leftrightslide[0]='<a href="javascript:popupWindow(\'http://www.ihlbooks.com/books/freedomsbattle.html\')"><img src="http://www.ihlbooks.com/images/freedomsbattle.jpg" border=0></a>'
    But, for various reasons, this would be a better approach:

    Code:
    leftrightslide[0]='<a href="http://www.ihlbooks.com/books/freedomsbattle.html" onclick="popupWindow(this.href);return false;"><img src="http://www.ihlbooks.com/images/freedomsbattle.jpg" border=0></a>'
    And - unless your popupWindow() function adds any functionality over simply using target="_blank" - Snookerman's idea will do just fine.
    - John
    ________________________

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

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

    Smile Conveyor belt solution: Thank you!

    Guys (snookerman and jschneuer1),

    I can't tell you how grateful I am for your help. It worked perfectly! I am besides myself! Thank you soooooo much! See here for a sample: www.edgarcayceproducts.com/healthbooks.html .

    You have been tremendously helpful. Thanks again!

    J.J.

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

    Default Conveyor belt slideshow script + text

    Well, I'm back... I didn't think I would need to pick your brains again, but I have another problem. I'm trying to add a simple title and a <br> to add another image link under each one of the pictures that are part of the slideshow conveyor belt. See here: http://www.mideastbooks.com .

    The script you guys helped me figure out the first time around was:

    leftrightslide[0]='<a href="http://www.mideastbooks.com/books/israelahistory.html" onclick="popupWindow(this.href);return false;"><img src="http://www.mideastbooks.com/images/israelahistory.jpg" border=0></a>'

    But now where do I insert the words for the title of each book to show under the image, and add another link with an order button?

    Actually, I'd be very happy just to add the words describing the product. I can add the button as I did for the graphic file (israelahistory.jpg in this case), but how do I get it to go under the name of the product itself?

    Thank you for whatever help you are willing to provide.

    J.J.

  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

    You have some other problems:

    Code:
    http://www.mideastbooks.com/images/waitingforisrael.jpg
    and:

    Code:
    http://www.mideastbooks.com/books/waitingforisrael.html
    are missing.

    Your onload event (MM_preloadImages) is riddled with illegal characters. But even if it weren't, it is being overridden by the conveyor belt script's onload event. To deal with that, replace it with:

    Code:
    <body bgcolor="#F2611A" text="#000000" leftmargin="0" topmargin="0" marginwidth="1" marginheight="0" onload="fillup();MM_preloadImages('http://www.mideastbooks.com/images/h-home-on.gif','http://www.mideastbooks.com/images/h-home-off.gif','http://www.mideastbooks.com/images/h-contact-on.gif','http://www.mideastbooks.com/images/h-contact-off.gif','http://www.mideastbooks.com/images/h-israel-off.gif','http://www.mideastbooks.com/images/h-israel-on.gif','http://www.mideastbooks.com/images/h-islam-off.gif','http://www.mideastbooks.com/images/h-islam-on.gif','http://www.mideastbooks.com/images/h-genocides-off.gif','http://www.mideastbooks.com/images/h-genocides-on.gif','http://www.mideastbooks.com/images/h-holocaust-off.gif','http://www.mideastbooks.com/images/h-holocaust-on.gif','http://www.mideastbooks.com/images/h-terrorism-off.gif','http://www.mideastbooks.com/images/h-terrorism-on.gif','http://www.mideastbooks.com/images/h-titles-on.gif','http://www.mideastbooks.com/images/h-titles-off.gif','http://www.mideastbooks.com/images/h-authors-on.gif','http://www.mideastbooks.com/images/h-authors-off.gif','http://www.mideastbooks.com/images/h-antisemitism-on.gif','http://www.mideastbooks.com/images/h-antisemitism-off.gif','http://www.mideastbooks.com/images/h-miscellaneous-on.gif','http://www.mideastbooks.com/images/h-miscellaneous-off.gif','http://www.mideastbooks.com/images/h-history-on.gif','http://www.mideastbooks.com/images/h-history-off.gif','http://www.mideastbooks.com/images/h-camera-on.gif','http://www.mideastbooks.com/images/h-camera-off.gif')">
    and remove:

    Code:
    window.onload=fillup
    from the conveyor script.

    Now, I'm not entirely clear on what you want to place in the conveyor with the images, but to do anything like that, you will need a table and a little extra height. So change:

    Code:
    var sliderheight="177px"
    to (approximately):

    Code:
    var sliderheight="207px"
    And change:

    Code:
    //Specify gap between each image (use HTML):
    var imagegap=" "
    to:

    Code:
    //Specify gap between each image (use HTML):
    var imagegap="</td><td>"
    And change:

    Code:
    leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'
    to:

    Code:
    leftrightslide='<table><tr><td>'+leftrightslide.join(imagegap)+'</td></tr></table>'
    And change:

    Code:
    document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+leftrightslide+'</span>')
    to:

    Code:
    document.write('<div id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+leftrightslide+'</div>')
    Once you have all that, you may include a <br> and whatever you want for each book, ex:

    Code:
    leftrightslide[0]='<a href="http://www.mideastbooks.com/books/israelahistory.html" onclick="popupWindow(this.href);return false;"><img src="http://www.mideastbooks.com/images/israelahistory.jpg" border=0></a><br>Whatever'
    - John
    ________________________

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

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
  •