PDA

View Full Version : javascript auto pop-up chromless window


cuoreart
10-02-2002, 07:41 PM
Hi, i don't know anything about javascript but i got 2 scripts, i got them to work both, but now i want them togetter.
Let me explain better.
first script is to make an auto-popup
<script>

function openpopup(){
var popurl="thankyou.htm"
winpops=window.open(popurl,"","width=400,height=338,scrollbars,")
}

openpopup()

</script>


than the second one is to make a chromless window

<script language="javaScript" type="text/javascript" SRC="java.js"></SCRIPT>

<script>
function openIT() {
theURL="yourpage.html"
wname ="CHROMELESSWIN"
W=300;
H=100;
windowCERRARa = "close_a.gif"
windowCERRARd = "close_d.gif"
windowCERRARo = "close_o.gif"
windowNONEgrf = "none.gif"
windowCLOCK = "clock.gif"
windowREALtit = "&nbsp;? Task title"
windowTIT = "<font face=verdana size=1>&nbsp;your chromless</font>"
windowBORDERCOLOR = "#000000"
windowBORDERCOLORsel = "#000000"
windowTITBGCOLOR = "#FF0033"
windowTITBGCOLORsel = "#FF0033"
openchromeless(theURL, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowNONEgrf, windowCLOCK, windowTIT, windowREALtit , windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}
</script>


But now i want a Chromless Window to popup automaticly

Best Regards,
cuoreart

tg
10-02-2002, 07:51 PM
try adding:

<body onLoad='openIT()'>

cuoreart
10-02-2002, 09:11 PM
i'm sorry to say, but i don't know a thing about javascript, so were should i add it?

toke
10-02-2002, 11:30 PM
after the </script> tag... there should be a <body> tag. that's where you add it. for example,

<html>
<head>
<title>Untitled Document</title>
<!-- begin your script -->
<script language="javaScript" type="text/javascript" SRC="java.js"></SCRIPT>

<script>
function openIT() {
theURL="yourpage.html"
wname ="CHROMELESSWIN"
W=300;
H=100;
windowCERRARa = "close_a.gif"
windowCERRARd = "close_d.gif"
windowCERRARo = "close_o.gif"
windowNONEgrf = "none.gif"
windowCLOCK = "clock.gif"
windowREALtit = "&nbsp;? Task title"
windowTIT = "<font face=verdana size=1>&nbsp;your chromless</font>"
windowBORDERCOLOR = "#000000"
windowBORDERCOLORsel = "#000000"
windowTITBGCOLOR = "#FF0033"
windowTITBGCOLORsel = "#FF0033"
openchromeless(theURL, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowNONEgrf, windowCLOCK, windowTIT, windowREALtit , windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}
</script>
</head>

<body bgcolor="#ffffff" onLoad='openIT()'>
</body>
</html>


something like this.

cuoreart
10-03-2002, 05:48 PM
Wow, 'm amazed, it works perfectly
if you want to see what i used it for:
http://216.222.201.254/raf/ :D

thx tg and toke

toke
10-03-2002, 08:45 PM
nice job :)