Click to See Complete Forum and Search --> : PopUp Maker 5.0


roby
12-19-2002, 12:56 AM
hi,

how can i use the PopUp Maker 5.0



roby

swon
12-19-2002, 06:23 AM
Create those popups with js, it's better then use a software.



for example:

<script language=javascript>
var w = window;
w.open('url','nameof','width=300,height=300,scrollbars=yes')
</script>

Ps. I don't know what POPUP Maker 5.0 is!

roby
12-19-2002, 10:36 AM
hi, sown

ok but where can i write it in the head or body or what

i want to popup page take name "ffff.htm" from main page take name "main.htm" how can i write it see you


roby

swon
12-19-2002, 11:27 AM
Easy like that:

<html>
<script language=javascript>
function openpop(url)
{
window.open(url,'winpoper','width=300,height=300,scrollbars=yes');
}
</script>
<body>
<a href="#" onClick="openpop('ffff.html')">make popup</a>
</bod>
</html>

roby
12-19-2002, 04:56 PM
hi, swon

how can i make it without click i mean direct when i brows the page



roby

Gummi
12-19-2002, 06:26 PM
OK how the hell do you do this??
Lets say you want to make a popup window and it is here: http://www.url.link/pop/popup1.html

What do you do??

swon
12-19-2002, 07:33 PM
Roby,

set the body onload event:

<html>
<script language=javascript>
function openpop(url)
{
window. open(url,'winpoper','width=300,height=300,scrollba
rs=yes');
}
</script>
<body onLoad="openpop('ffff.html')">
</bod>
</html>

Note that PopUp's does not makes anybody happy!

pyro
12-19-2002, 09:20 PM
Originally posted by swon
Note that PopUp's does not makes anybody happy!
I agree with that, but a client I made a website for wanted to show users some important information about their site. What I did is allowed the user to click a checkbox in the popup and that would set a cookie that would keep the window from opening on future visits. Just in case roby's situation is something like that, I thought I'd point out that he can allow his users to not show the popup on future visits.

pyro
12-19-2002, 09:23 PM
Gummi -- this should work.

<Script language=JavaScript>
var page = "http://www.url.link/pop/popup1.html";
var windowproperties = " width=550,height=300,location=yes,toolbar=yes,menu
bar=yes,scrollbars=yes,resizable=yes";
var name = "internalWin";

window.open(page, name, windowproperties);
</Script>

Gummi
12-20-2002, 06:33 AM
how will the link be? just:
<a href="http://www.url.link/pop/popup.thml">Open</a> ??

swon
12-20-2002, 06:58 AM
the example from pyro load it automatically, you don't need any link to open the new window.

Gummi
12-20-2002, 07:05 AM
well, nothing happens

swon
12-20-2002, 07:08 AM
Ok, try it with this one:

<html>
<script language=javascript>
function openpop(url)
{
window. open(url,'winpoper','width=300,height=300,scrollbars=yes');
}
</script>
<a href="#" onClick="openpop('ffff.html')">open</a>
</body>
</html>

pyro
12-20-2002, 07:42 AM
It should work fine. Try putting the code in you <head> tag. If it doesn't work, post the code you are using for you page.

Also, the line of code for you window properties should all be on one line. The forums just split the line.

Gummi
12-20-2002, 05:38 PM
yeah the pyro works but how do you make it come when clicking a link?

E.g like here: http://www.virtualbattlefieldsystems.com/screenshots04.html

pyro
12-20-2002, 05:54 PM
This goes in your <head>

<Script language=JavaScript>
function openwin()
{
var page = "http://www.url.link/pop/popup1.html";
var windowproperties = " width=550,height=300,location=yes,toolbar=yes,menu

bar=yes,scrollbars=yes,resizable=yes";
var name = "internalWin";

window.open(page, name, windowproperties);
}
</Script>

This goes where you want your link

<A HREF="javascript:openwin()">open window</A>

Gummi
12-20-2002, 06:05 PM
thx. one more question(the last one): If you want to have more than one popup.

swon
12-20-2002, 08:34 PM
yeah the pyro works but how do you make it come when clicking a link?

It does on your page!?

pyro
12-20-2002, 10:33 PM
You just need to copy the top function. Use this to open two windows

<head>
<script language=javascript>
<!--

function openwin1()
{
var page = "http://www.url.link/pop/popup1.html";
var windowproperties = " width=550,height=300,location=yes,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes";
var name = "internalWin";

window.open(page, name, windowproperties);
}

function openwin2()
{
var page = "http://www.url.link/pop/popup1.html";
var windowproperties = " width=550,height=300,location=yes,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes";
var name = "internalWin"; //rename if you want to open multiple windows

window.open(page, name, windowproperties);
}
//-->
</script>
</head>
<body>
<A HREF="javascript:openwin1()">open window1</A>
<A HREF="javascript:openwin2()">open window2</A>
</body>


Note: if you want them to be able to open two at the same time (in two popup windows), the name variable must be differnt for both functions. As is, it will open the first one in a new window, and if you click the second one, it will just replace the first one. Also, once again, the var windowproperties must all be on one line.

Originally posted by swon
It does on your page!?

Doesn't this work for you, swon??

roby
12-21-2002, 04:56 PM
hi,


thank you very much men

roby