Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oops! Pop-up pages 'on the fly' ?

Status
Not open for further replies.

BootBoy

Technical User
Apr 30, 2002
24
0
0
GB
I have an art gallery site with 100's of galleries of individual artist's work. Each artist's gallery has up to 100 thumbnails. I'm trying to find a script (perl/javascript?) that will automatically create either pop-up pages 'on the fly' or even layers, containing (only) the larger version of the thumb, 'onclick'. I don't want to use 'Open browser window' or 'swap image' or show/hide layers alone as the work involved would be huge and the pages verbose.

If anyone has come across an efficient way of doing this I would be very grateful. Note: Each artist has their own folder with identical stucture ie. index.htm and 2 folders, 1 containing thumbs and 1 with 'big pics'. All images are named 1.jpg, 2.jpg, 3.jpg etc.

Thanks for your attention.

B [ponder]
 
Bootboy, i was referred to this site by a friend when i needed scripts for my sites i believe you can post your project their and find the one who can make something customizable for you..

good luck
 
This is what you need I think:

function openPhoto(img, w, h) {

var windowprops = "location=no,scrollbars=no,menubar=no,toolbar=no,resizable=no" + ",left=300,top=100" + ",width=" + w + ",height=" + h + ";"

a = window.open("","popup",windowprops);
a.document.open();
a.document.write('<html><body>');
a.document.write(&quot;<image src='photos/&quot; + img + &quot;' width=&quot; + w + &quot; height=&quot; + h + &quot; border='0' alt=''>&quot;);
a.document.write('</body></html>');
a.document.close();
}

<a href=&quot;1.jpg&quot; onclick=&quot;openPhoto(this.href, 400, 300); return false&quot;><img src=&quot;photos/small1.jpg&quot; ...></a>
 
xutopia: Thanks for the link, looks like a whole bunch of useful stuff, the PerlMagick section looks particularly relevant. Cheers.

worldsmine: Thanks this looks like a useful site, if I get desperate! Thanks matey.

starway: I tried it and it works and less verbose than DW's 'Open Browser Window'. Nice one, cheers!

I posted the same query on the Perl Forum and if your interested, this contribution from PerlIsGood seems to be exactly what I was looking for. I haven't tested it yet but take a look at:


Thanks again guys, I love this place!!

B [spin2]
 
Hi, Starway..

the code that you posted doesn't work in Netscape 6. However, it works in Netscape 4 and IE.
Any suggestions ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top