...

View Full Version : How to alter this code to make popup open *another* popup onClick?



mjstone323
08-24-2002, 01:08 AM
Hi -
I know very little about JavaScript and I'm trying to finish a website...

I hope someone knows how to do this because I'm going bonkers!!!

This script works just fine to make a larger version of a clicked thumbnail pic (in a Flash movie) pop up:

<SCRIPT LANGUAGE="JavaScript">
<!--
function pop1(){
window.open("Images/Associates/1.jpg","","height=450,width=302,left=100,top=100,scrollbars=0,resizable=0");
}
//-->
</script>

What I want is, when the larger version pops up, the visitor can click on the picture (or a link that appears in the picture) and go to their website. (I know this must be possible because I see it everywhere in those annoying popup ads... :rolleyes: )
I've tried all sorts of things, and all I get are error messages... argh.
Thanks in advance... Marianne

jujubees
08-24-2002, 01:51 AM
Hey mjstone323,

I'm just starting out too, so this might be like the blind leading the blind. :p

Static images don't have inherent hyperlinks so I think what you'll need to do is create an HTML page with only 1.jpg within the <body> tags.

You'll also need to rewrite your JS to open up the HTML page in the popup window.

Hope that made sense ...


<SCRIPT LANGUAGE="JavaScript">
<!--
function pop1(){
window.open("Images/Associates/1.html",""," height=450,width=302,left=100,top=100,scrollbars=0
,resizable=0");
}
//-->
</script>

mjstone323
08-24-2002, 02:10 AM
Thanks jujubees :thumbsup: - I actually had that thought but was hoping I didn't have to do that.... There are fifteen images -

But guess what?!?! I've probably spent more time trying to figure out how to alter the JavaScript than it's going to take me to create 15 little HTML docs... argh. :p

If anyone else has any ideas, keep 'em comin'....

mjstone323
08-24-2002, 02:36 AM
Hi again -
Just tried your suggestion, jujubees - works EXACTLY the way I want it to. You rock. :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum