PDA

View Full Version : Ultimate Fade-In Slide Show -- link=pop up window?



1saucygirl
06-02-2006, 08:49 PM
Hello,
When I click on an image in my slideshow (uses Ultimate Fade-in Slide Show), a regular browser window comes up. How can I set the image link to create a pop-up window with no browser toolbar, a set width and no horiz. scrollbar?

Thanks!
:)

jscheuer1
06-02-2006, 09:10 PM
That would involve changing this function in the script:


fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}

See how it is building the slideHTML string and then populating the picobj with this generated code? You would need to substitute your desired code, something like:


fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" onclick="myWin(this.href);return false;">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}

Then you then could have a function on your page called myWin, something like this:

function myWin(url){
window.open(url,'_blank','width=240, height=300, top=200, left=250')
}

Using whatever specifications you want for the new window.

1saucygirl
06-07-2006, 07:05 PM
Thanks so much! I'll give that a try.