PDA

View Full Version : Pixelating Image slideshow



Darksaint
03-31-2006, 07:17 PM
IS there a way to set it up to open in a different frame or a new window. Sorry if there is allready a thread on this but didnt see one.

script link: http://www.dynamicdrive.com/dynamicindex14/pixelate.htm

I found this link but it still only opens in the same window frame.
http://www.dynamicdrive.com/forums/showthread.php?t=1723&highlight=Pixelating

jscheuer1
03-31-2006, 07:33 PM
Yes, here is where the link is activated:


function gotoshow(){
window.location=slidelinks[whichlink]
}

You can use the window.open() method to force all links to a new window:


function gotoshow(){
window.open(slidelinks[whichlink])
}

Or use a frame name:


function gotoshow(){
frameName.location=slidelinks[whichlink]
}

But you may need to use top or parent:


function gotoshow(){
parent.frameName.location=slidelinks[whichlink]
}

I think ddadmin and possibly I each worked out a way to modify either the image and/or link array so that each could have a custom opening method. I'll look around and see if I can find one of those threads.

jscheuer1
03-31-2006, 07:50 PM
I couldn't find it so, you could use this as your link array (comments green):


var slidelinks=new Array();
slidelinks[0]=["http://www.dynamicdrive.com", "_new"] // syntax for new window
slidelinks[1]=["http://google.com", "main"] // syntax for frame named 'main'
slidelinks[2]=["http://www.geocities.com", ""] // syntax for same window or frame as script

and this for the gotoshow() function:


function gotoshow(){
if (slidelinks[whichlink][1]=='_new')
window.open(slidelinks[whichlink][0])
else if (slidelinks[whichlink][1]!='')
parent[slidelinks[whichlink][1]].location=slidelinks[whichlink][0]
else
window.location=slidelinks[whichlink][0]
}