View Full Version : Content sensitive popups help!


CreatorCaz
05-08-2003, 07:15 AM
I know what I'd like to do, on my photo page I've got links to pictures which open in a new window, I'd like the new window to be resized automatically to the size of the picture, I think it looks better. I've seen sites that have this and I think they use Javascript, well that's what I've gathered. How would I go about doing this...anyone?
Er, if you don't know what I mean, I can expand!

amicus
05-08-2003, 01:59 PM
just put the script into the head and pass in the url, title and features for every link. 'javascript' is one word, for some reason the forum splits it up.

function popUp( url, title, features ) {
window.open( url, title, features );
}

<A HREF="javascript:popUp( 'http://www.lissaexplains.com', 'lissa', 'toolbar=no, location=no, scrollbars=no, resizable=0, width=300, height=300' )">text</A><BR>
<A HREF="javascript:popUp( 'http://www.amicusproductions.com', 'amicus', 'toolbar=no, location=no, scrollbars=no, resizable=0, width=150, height=150' )">text 2</A>

CreatorCaz
05-08-2003, 03:21 PM
ok, i'll try that. yeah wierd how it says JavaScript...