PDA

View Full Version : Javascript popups


ironduke
04-07-2004, 04:52 PM
Compared to people my age, I think I know a good amount about computers. Especially since I have a million other interests and hobbies. Yet, as I try to get more complex with my web page, it just gets stressful (not really stress, but frustrating).
My web page: www.ironduke.net


Anyway myquestion here is javascript pop ups:

http://www.fg-a.com/java4.shtml

^^ that site explains them, but I didn't understand it, and i tried it and it didnt work for me.

heres my html:
Please, someone, let me know where these codes are supposed to go.

<embed src="Yellowcard%20-%20Breathing.mp3" hidden="true" autoplay="true" loop="true">

<html><head><title>Your Title Here</title>
<meta content="MSHTML 6.00.2800.1106" name="GENERATOR" />
<meta content="Layout is Copyright © http://www.gnext.vze.com" name="copyright" />
<meta content="Your Keywords here" name="keywords" />
<meta content="Your Site Description here" name="description" />
<style type="text/css">
BODY {
SCROLLBAR-FACE-COLOR: #000000; SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; SCROLLBAR-SHADOW-COLOR: #2e425a; SCROLLBAR-3DLIGHT-COLOR: #2e425a; SCROLLBAR-ARROW-COLOR: #bccbdc; SCROLLBAR-TRACK-COLOR: #2e425a; SCROLLBAR-DARKSHADOW-COLOR: #000000; BACKGROUND-COLOR: #000000
}
A:link {
COLOR: #bccbdc; TEXT-DECORATION: none
}
A:active {
COLOR: #bccbdc; TEXT-DECORATION: none
}
A:visited {
COLOR: #bccbdc; TEXT-DECORATION: none
}
A:hover {
COLOR: #597795; TEXT-DECORATION: underline
}</style>
</head>
<body text="#ffffff" bottomMargin="0" vLink="#ffffff" link="#bccbdc"


<table cellSpacing="0" cellPadding="0" width="710" border="0" valign="top"><tbody><tr><td><p align="center"><font face="Arial"></font>
</p>
<p align="center"><font size="5"><strong><font face="Arial Narrow"><a href="http://www.ironduke.net:2082/frontend/default/files/htmledit/"><img height="60" src="http://www.ironduke.net/images/adbanner.jpg" width="468" border="1" borderColor="#3296CA" />
</a>
</font>
</strong>
</font>
</p>
<p align="center"><font size="5"><strong><font face="Lucida Sans Unicode"><font color="#ffffff">Unfortunately, IronDuke.net is under construction.
</font>
</font>
</strong>
</font>
</p>
<p align="center"><img src="http://images.animfactory.com/animations/computer/parts/server_on_fire_md_blk.gif" />
</p>
<p align="center"><img alt="Free Web Site Counter" hspace="4" src="http://beta.easyhitcounters.com/counter/index.php?u=rossj711&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp ;amp;amp;amp;amp;amp;amp;s=scoreboard" align="middle" vspace="2" border="0" />
</p>
<p align="center"></p>
<p align="center"><font face="Arial"><font size="2"><font color="#999999"><strong>Kim Detrichs memorial page is still online and running.
<br />
</strong>
Click here:
<strong>
</strong>
</font>
</font>
</font>
<a href="http://www.ironduke.net/kim.html"><font face="Arial" color="#999999" size="2">www.ironduke.net/kim.html
</font>
</a>
</p>
</td>
</tr>
</tbody>
</table>
<table height="100%" cellSpacing="0" cellPadding="0" width="750" border="0" valign="top"><tbody><tr><td vAlign="top" width="130"><font face="Lucida Sans Unicode"><br />
<br />
<br />
<br />
</font>
</td>
<td vAlign="top" width="482"><font color="#bccbdc"></font>
<br />
<p align="center"></p>
<p align="center"></p>
<br />
</td>
<td vAlign="top" width="130"><br />
<br />
<br />
</td>
</tr>
</tbody>
</table>
</body>
</html>

Joe
04-07-2004, 05:11 PM
<!-- TWO STEPS TO INSTALL POPUP WINDOW:

1. Paste the first into the HEAD of your HTML document
2. Use the code to open the popup page on your site -->

<!-- STEP ONE: Copy this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- This script generated free online at -->
<!-- Free Gifs & Animations http://www.fg-a.com -->

<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=0,location=1,statusbar=1,menubar=1,resizable=0,width=400,height=400');");
}
// End -->
</script>


<!-- STEP TWO: Use the following link to open the new window -->

<A HREF="javascript:popUp('page')">Open the Popup Window</A>

<!-- Script Size: 0.73 KB -->


<head>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script generated free online at -->
<!-- Free Gifs & Animations http://www.fg-a.com -->

<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=0,location=1,statusbar=1,menubar=1,resizable=0,width=400,height=400');");
}
// End -->
</script>
</head>

<body>
<A HREF="javascript:popUp('page')">Open the Popup Window</A>
</body>

ironduke
04-07-2004, 09:56 PM
Haha! Guess what, I'm not as stupid as I thought. It finally occured to me that my browser (Mozilla) blocks popups.. What do you know?!

Anyway, thanks for the help.

Let me know what you think of the popup.
www.ironduke.net

Joe
04-08-2004, 06:25 AM
Originally posted by ironduke
Haha! Guess what, I'm not as stupid as I thought. It finally occured to me that my browser (Mozilla) blocks popups.. What do you know?!

Anyway, thanks for the help.

Let me know what you think of the popup.
www.ironduke.net heehee :D

easy mistake, but you have to remember, if your browser stops your pop-up then alot of others will too

ironduke
04-08-2004, 05:20 PM
I know.

mattburnsey
04-09-2004, 06:52 PM
Alright, I have a slight problem, and I've searched for it and can't find it, although I'm sure it's there somewhere. Sure the pop up window is great, but what happens when you have two links on your page and you want both to be in a pop up? Or have I just really not grasped this?

AndrewAK
04-10-2004, 03:20 AM
Is the Password prompt the popup that is the topic? If so, it looks good to me.

agent002
04-10-2004, 03:57 AM
Originally posted by mattburnsey
Alright, I have a slight problem, and I've searched for it and can't find it, although I'm sure it's there somewhere. Sure the pop up window is great, but what happens when you have two links on your page and you want both to be in a pop up? Or have I just really not grasped this?
it all goes smoothly if your code just is good enough. try something like this:
<a href="http://www.google.com" target="_blank"
onclick="window.open(this.href, this.target, 'width=500,height=450,scrollbars=yse,resizable=yes'); return false;">Google</a>
:)

mattburnsey
04-10-2004, 11:42 AM
that did the trick! Thanks!