abercrombieclad
02-07-2004, 09:36 PM
hey there-
whats the popup window code off of an image map...if that didn't make sense, i mean: if i have an image map and want a popup when you click on the link, whats the code?
megan
MaGiCSuN
02-07-2004, 09:42 PM
the
href="urlhere"
part should be
href="javascript:popup();"
then and offcourse the script code between the <head> and </head> should be there. So full code should be this:
<AREA HREF="javascript:popup();">
NOTE: all javascript should have those _ deleted in them, the forum puts them in
More about popups and the <head></head> coding here:
http://www.lissaexplains.com/javascript4.shtml
Love,
Mirna
abercrombieclad
02-07-2004, 09:45 PM
what do i put where it says popup
MaGiCSuN
02-07-2004, 09:51 PM
this goes between the <head> and </head>
<script language="javascript" type="text/javascript">
//<!--
function popup()
{ window.open ("YourURLgoesHere.html","popup","width=400,height=400,location=0,menubar=0,resizabl e=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
-->
</script>
then this will be your link:
<AREA HREF="javascript:popup();">
you don't change anything about it ONLY the part that says YourURLgoesHere.html because that's the url that opens inside the popup. If you want a pop-up for more links repeat this part:
function popup
{ window.open ("YourURLgoesHere.html","popup","width=400,height=400,location=0,menubar=0,resizabl e=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
and change popup to popup2 popup3 and so on. Each popup + link should have different names. Example for 3 popups:
<html>
<head>
<script language="javascript" type="text/javascript">
//<!--
function popup()
{ window.open ("YourURLgoesHere.html","popup","width=400,height=400,location=0,menubar=0,resizabl e=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
function popup2()
{ window.open ("YourURLgoesHere.html","popup2","width=400,height=400,location=0,menubar=0,resizabl e=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
function popup3()
{ window.open ("YourURLgoesHere.html","popup3","width=400,height=400,location=0,menubar=0,resizabl e=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
-->
</script>
</head>
<body>
<AREA HREF="javascript:popup();>
<AREA HREF="javascript:popup2();>
<AREA HREF="javascript:popup3();>
</body>
</html>
the link matches the popup coding :) Hope it helps. This all can also be found on the page that i referred to in my first post
NOTE: all spaces bewteen words should be removed, and javascript should be written without _ in it. IT's better to get these codes off the site i referred to in my first post, because the forum messes it up
Love,
Mirna
Monkey Bizzle
02-07-2004, 09:55 PM
Here is the code I use for my pop-up window.
<a href="#" onClick="window.open('http://URL address goes here','pop_up','height=370,width=255,top=50,left=5 0,resizable=yes,scrollbars=yes')" style="color:#linkcolor;">Whatever</a>
Everything in red you would change to what you wanted it to be. The linkcolor is optional. If you take out the style="co... then it will default to whatever you have your link color set to in the body tag.
I hope this helped.
MaGiCSuN
02-07-2004, 09:59 PM
for the image map it would be this then:
<area href="#" onClick="window.open('http://URL address goes here','pop_up','height=370,width=255,top=50,left=5 0,resizable=yes,scrollbars=yes')">
Love,
Mirna
abercrombieclad
02-07-2004, 10:07 PM
thanks so much for helping! it worked! love ya guys...
Megan