Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Help me please

  1. #1
    Join Date
    Jun 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help me please

    I'm having problems adding link coding to the convey belt slideshow script. I want the links to open up in a new centred window at a a size of 400 x 300 with no scroll bar. Can anyone tell me what code I need to add?

  2. #2
    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 can use something like this:

    Code:
    leftrightslide[0]='<a href="#" onclick="window.open(\'http://www.yahoo.com\',\'yahWin\',\'width=400, height=300\');return false"><img src="dynamicbook1.gif" border=1></a>'
    - John
    ________________________

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

  3. #3
    Join Date
    Jun 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Excellent, but what snippet of code do I need to add so that the window opens centraly and not left of screen ?

  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

    That's a little more involved. Use the Popup Window Generator. Then after you put the generated script in the head, you can use something like this in the Conveyor script:
    Code:
    leftrightslide[0]='<a href="http://www.google.com" onclick="NewWindow(this.href,\'mywin\',\'500\',\'300\',\'no\',\'center\');return false" onfocus="this.blur()">><img src="dynamicbook1.gif" border=1></a>'
    The real trick is that whatever code is generated by the Popup Generator for use in the html part of the page must be escaped, substituting:

    \'

    for:

    '

    wherever it occurs before it is used in the Conveyor script. The neat thing is, if you want a bunch of these Popup Windows, all of the same dimensions and location on the screen but with different links, once you've generated the code for one, you can just use the one script for all (head part of the script) simply changing the link's href in the 'html' part of the script.
    - John
    ________________________

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

  5. #5
    Join Date
    Jun 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    cheers

    thank you John

  6. #6
    Join Date
    Jun 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    What snippet of code do I need to add so that it will display content in an iframe when I move the mouse over an image in the Conveyor belt?

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

    First you need a named iframe on your page ex:
    Code:
    <iframe name="fred" src="" width="200" height="200" scrolling="no" frameborder="0"></iframe>
    Set its width and height to that of the content you wish to display in it OR set its scrolling to "yes".

    Then in the conveyor script do something like this (from the demo, addition in red):
    Code:
    leftrightslide[0]='<a href="http://"><img onmouseover="fred.location.replace(\'some.htm\')" src="dynamicbook1.gif" border=1></a>'
    You can substitute any html file for some.htm. You can also use an image file.
    - John
    ________________________

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

  8. #8
    Join Date
    Jun 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default conveyor script

    If I replace the some.htm with an image file example image.jpg
    the image will not show up in the iframe - a box comes up asking me to
    open or save the image - how can I adjust the code to work around this?

    Frode

    First you need a named iframe on your page ex:
    Code:
    <iframe name="fred" src="" width="200" height="200" scrolling="no" frameborder="0"></iframe>Set its width and height to that of the content you wish to display in it OR set its scrolling to "yes".

    Then in the conveyor script do something like this (from the demo, addition in red):
    Code:
    leftrightslide[0]='<a href="http://"><img onmouseover="fred.location.replace(\'some.htm\')" src="dynamicbook1.gif" border=1></a>'You can substitute any html file for some.htm. You can also use an image file.

  9. #9
    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 tested this here under Windows XP using both IE6 and FF1.0.4 and both worked fine with an image file. What browser/OS combination are you using? It may be a setting in your browser. Anyways, you can get around it by making a page and putting your image on it. Then use the page's url instead of that of the image.

    One other thought, if you have made a syntax error, this could be the cause. If that's it, to diagnose that, I'd have to see a demo of the problem.
    - John
    ________________________

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

  10. #10
    Join Date
    Sep 2005
    Location
    Izmir, Turkey
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default What a veritable gold mine

    Hej John,
    I got stuck on the same problems with Conveyor Scripts as PhaZe above, but your patient and absolutely clear instructions are more than helpful.

    Some people can learn a little about scripts, staggering through various stages of web-design, but you seem to have the grasped scripts better than most - and you are prepared to share your time and yours skills more than most .

    Thanks (from those of us that still struggle with scripts), and thanks for your human efforts.

    Graeme.

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
  •