View Full Version : Blending Image Slideshow Script (open links in frame?)
1) Script Title: Blending Image Slideshow Script
2) Script URL (on DD): http://dynamicdrive.com/dynamicindex14/image4.htm
3) Describe problem: I am trying to figure out if i can get the images in this slideshow script to open in a frame?
Thanks.
jscheuer1
11-25-2010, 06:51 AM
Assuming you mean frame, not iframe and that this is a frameset page and that the script is in one frame of the frameset and the target frame is also a member of the frameset and has a name attribute:
<frame name="frameName" src ="whatever">
Set this to 0 as shown:
var newwindow=0 //open links in new window? 1=yes, 0=no
Change this:
function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}
to:
function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
top.frames.frameName.location.href=slidelinks[whichlink]
}
Note: For widest compatibility, you may have to use the frame's #, example:
top.frames[1].location.href=slidelinks[whichlink]
Frames are numbered 0 to whatever, based upon the order in which they appear on the frameset page.
Awesome, many thanks! And it did work in an iframe!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.