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?
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?
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
Excellent, but what snippet of code do I need to add so that the window opens centraly and not left of screen ?
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: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: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>'
\'
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
cheers
thank you John
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?
First you need a named iframe on your page ex:Set its width and height to that of the content you wish to display in it OR set its scrolling to "yes".Code:<iframe name="fred" src="" width="200" height="200" scrolling="no" frameborder="0"></iframe>
Then in the conveyor script do something like this (from the demo, addition in red):You can substitute any html file for some.htm. You can also use an image file.Code:leftrightslide[0]='<a href="http://"><img onmouseover="fred.location.replace(\'some.htm\')" src="dynamicbook1.gif" border=1></a>'
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
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.
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
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