ditzy-bunny
07-20-2003, 02:38 AM
Please Please Please!!! I have been looking for a code on how to make a pop-up window...and i found one here but it doesnt seem to work. I am trying to do the image link one and I think its not working because i put the second part of the code in the wrong place. Can someone please help me I'm absoloutly desperate!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!
Dude128
07-20-2003, 02:59 AM
could you post the code you're using or a link to the page, so that we can help you identify what's wrong and fix it?
ditzy-bunny
07-20-2003, 03:08 AM
ummm sure.... she sadi to put this code:
<script language="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>
Next you have to add this code where you want the image link to appear (substitute the word "popup" in the above and below codes to reflect the name of YOUR window, and substitute your info where you see bold text:
<a href="javascript:popup()"><img src="blah.gif" border=0 width="40" height="40" alt="your image description here"></a>
now for the last part of the code i dont understand where to put it wherever i put it it doesnt work
Dude128
07-20-2003, 03:22 AM
the first code goes anywhere between the <head> and </head> tags. the link code itself goes anywhere in the body section, anywhere between the <body> and </body> tags. you would just put it wherever you want the link to appear.
ditzy-bunny
07-20-2003, 03:35 AM
I did what you said and it still didnt work...here...ill post exactly what i did and then u can tell me what i did wrong.
<html><head>
<script language="javascript">
//<!--
function popup()
{ window.open ("http://www.geocities.com/x0x_ditzybunny_x0x/ditzy.html","popup"," width=400,height=400,loca
tion=0,menubar=0,resizabl
e=0,scrollbars=0,status=0
,titlebar=1,toolbar=0") }
-->
</script></head>
<body><a href="javascript:popup"><img src="http://www.geocities.com/x0x_ditzybunny_x0x/entersite.gif" border=0 alt="Click Here To Enter Ditzy-Bunny"></a>
</body>
</html>
Dude128
07-20-2003, 03:38 AM
in the link, it should be javascript:popup() - you just forgot the parentheses :)
ditzy-bunny
07-20-2003, 03:41 AM
that's all i forgot???wow lets see if this works:)
ditzy-bunny
07-20-2003, 03:43 AM
okay i did that but still when i click my image it doesnt work....nothing comes at all:S
Dude128
07-20-2003, 03:48 AM
did you by any chance copy what I posted? because that space shouldn't be there- the forum likes to break some things up :)
if that isn't the problem, try using only the file name rather than the full URL in your code, if you can. if not, (I didn't think you had to escape the / in JavaScript, but you might...) try replacing each / in the URL with \/
ditzy-bunny
07-20-2003, 03:58 AM
sorrry for taking up ur time...that didnt work either...well how about this..the only thing i can think of is that when im preveiwing my page everytime i click the image it goes to http://www.geocities.com/x0x_ditzybunny_x0x/javascript:popup() and i dunno how that is supposed to help but thats all i can think of (if u didnt notice already im using geocities:P)