PDA

View Full Version : Slideshow with image map using onclick links?



DataRipple
04-06-2009, 09:16 PM
I would really appreciate help with this slideshow that I'm working on. In short, I've implement a slideshow of images with an image map but keep failing when it comes to making the links open in a new window of a specific size.

Here's the bit of code that needs to be tweaked..


var fadeimages=new Array()
fadeimages[0]='<img src="slide01.jpg" usemap="#1" border="0">\
<map name="1">\
<area shape="POLY" coords="587,60,603,47,624,28,640,11,652,0,700,0,667,38,615,91,588,59" href="http://www.google.com" \
target="_blank"><area shape="default" nohref>\
</map>'
fadeimages[1]='<img src="slide02.jpg">'
fadeimages[2]='<img src="slide03.jpg">'


I know that the following code works just fine outside of being in a slideshow.. I just need the onclick... applied somehow to the above code.


<MAP NAME="map1">
<AREA SHAPE=POLY COORDS="587,60,603,47,624,28,640,11,652,0,700,0,667,38,615,91,588,59" onclick="javascript:window.open('https://www.google.com/','Preview','toolbar=no,location=no,status=no,menubar=no,resizable=yes,scrollbars=no,width=280,height=300'); return false;" href="#">
</MAP>


Again, I'll really appreciate the help as I keep failing over and over again.

- Garret

DataRipple
04-06-2009, 09:49 PM
Nevermind, I figured it out... While posting my message it occured to me that I should try doing the following.....


Use...

<MAP NAME="1">
<AREA SHAPE=POLY COORDS="587,60,603,47,624,28,640,11,652,0,700,0,667,38,615,91,588,59" onclick="javascript:window.open('https://www.google.com/','Preview','toolbar=no,location=no,status=no,menubar=no,resizable=yes,scrollbars=no,width=280,height=300'); return false;" href="#">
</MAP>

and use...

fadeimages[0]='<img src="slide01.jpg" usemap="#1" border="0">'


I feel like an idiot but at least I figured it out and I hope this thread helps someone out one day.

- Garret

ecordes
03-16-2010, 04:42 PM
Garret,

I'd like to look at all of the code you used to do this. If in fact this feature is still active on your site, could you give me the url?

Thanks!