PDA

View Full Version : Little java script?


hdrporn
01-26-2002, 11:12 PM
I'd appreciate if someone could help me out with a small javascript. Well at least I think it should be small.

What I need a way to put a code on a page so that it executes this:
"toolbar=no,menubar=no,status=no,location=yes,scrol lbars=no,resizable=no"

I need to be able to put it on the same exact page and not on the previous page opening the link.

I hope this is possible.

Mart

Dawgy
01-26-2002, 11:39 PM
you cannot do those things to the current window. youll have to open it with those properties & blur the old one or something

WiredGuy
01-27-2002, 12:03 AM
Resizing the window is possible from itself but not all the things you wrote above.

WG

hdrporn
01-27-2002, 12:15 AM
Ok then how would I integrate this:

"toolbar=yes,menubar=yes,status=yes,location=yes,sc rollbars=yes,resizable=yes");

into this skimming script:

#!/usr/bin/perl
$where = $ENV{'QUERY_STRING'};

#This is the url to your out script
###################################
$url = "http://cz3.clickzs.com/cj2.php?xxx";

#What percentage of surfers should go to the intended gallery
################################################## ###########
$pig = "70";

srand;
$n = int rand(100);
if ($n < $pig)
{
print "Location: $where\n\n";
}
else
{
print "Location: $url\n\n";
}

so that when $where opens, the window has the characteristics mentioned above?

Thanks,

Mart

Dawgy
01-27-2002, 12:35 AM
instead of those two lines that have print location, put the code to open a new window with the $where as the location.

might i suggest www.javascriptsource.com (http://www.javascriptsource.com)

:D

hdrporn
01-27-2002, 01:34 AM
Ok, I figured how to do it. Thanks for the help, much appreciated.

Mart