PDA

View Full Version : Help - Popup Code


hildebrand
08-27-2002, 05:00 PM
I'm looking for a popup code. This is the Code as you can find it in the WA-homepage:

<script>
//Popup Window Script
//By JavaScript Kit (http://javascriptkit.com)
//JavaScript tutorials and over 400+ free scripts
function openpopup(){
var popurl="thankyou.htm"
winpops=window.open(popurl,"","width=400,height=338,")
}
</script>
<a href="javascript:openpopup()">Click here to open window</a>

but I need a popup that start from an IMAGE and not from a link. How can I edit the code? could someone help me?

Thank you very much!

beetle
08-27-2002, 05:13 PM
Change it up like this<script>
//Popup Window Script
//By JavaScript Kit (http://javascriptkit.com)
//JavaScript tutorials and over 400+ free scripts
function openpopup(popurl){
winpops=window.open(popurl,"","width=400,height=338,")
}
</script>
<a href="javascript:openpopup('pic.gif')">Click here to open window</a>

Edited to remove space between java & script by coding colon with &amp;#58;

hildebrand
08-27-2002, 05:34 PM
Thank you very much for your really prompt answer, but this is not exactly what I'm looking for.
you wrote:

<script>
function openpopup(popurl){
winpops=window.open(popurl,"","width=400,height=338,")
}
</script>
<a href="javascript:openpopup('pic.gif')">Click here to open window</a>

I would like to click not on a link, but on an image. I've an HP with some thumbails and would like to open the bigger images in popups insteed of in new fensters. Do you think, it is possible?

Thank you

beetle
08-27-2002, 06:27 PM
oh, sure, I see.

<img src="pic1_small.gif" onClick="openpopup('pic1_big.gif');">

hildebrand
08-27-2002, 06:55 PM
SUPER!! I've my POPUP now!!!
1000 grazie


Originally posted by beetle
oh, sure, I see.

<img src="pic1_small.gif" onClick="openpopup('pic1_big.gif');">