View Full Version : Window popout help...wun work for me...
HyeSung
10-07-2002, 01:50 PM
Sorry...I tried to find help among the pages of which others might have asked b4 but I still can't find an answer. I wanna make a window popout and I think if I didn't type wrongly, the java script should go something like tt...
<script language="JavaScript">
config='toolbar=no,location=no,directories=no,status=no,menubar=no,width=500,height=300'
config += 'scrollbars=no,resizable=no'
pop = window.open ("","pop",config)
pop.document.write('<html><head><title>your title</title></head>');
pop.document.write('<script language="javascript">');
pop.document.write('setTimeout(');
pop.document.write('"self.close()');
pop.document.write(';",90000)');//關閉時間ms
pop.document.write('</');
pop.document.write('script>');
pop.document.write('<body bgcolor="FF972F" style="font:12pt; color:ffffff"><center>');
pop.document.write('watever the message you want to type <br />;
pop.document.write('</center></body></html>');
</script>
Can someone check where my problem lies...coz it got some error when i type this in my webpage...Thanks in advance~!
tommysphone
10-07-2002, 01:54 PM
I played with the code and reworked it a bit. tested in IE6 and works fine. I get an orange popup on load with white writing.
<script language="JavaScript">
config='toolbar=no,location=no,directories=no,status=no,menubar=no,width=500,height=300'
config='scrollbars=no,resizable=no'
pop = window.open ("","pop",config)
pop.document.write('<html><head><title>your title</title></head>');
pop.document.write('<script language="javascript">');
pop.document.write('setTimeout(');
pop.document.write('"self.close()');
pop.document.write('",90000)');
pop.document.write('</');
pop.document.write('script>');
pop.document.write('<body bgcolor="FF972F" style="font:12pt; color:ffffff"><center>');
pop.document.write('watever the message you want to type <br />');
pop.document.write('</center></body></html>');
</script>
HyeSung
10-07-2002, 02:05 PM
I edited according to what u have adjusted but my window bar there says error on page and there's no window poping out... :confused: how?
Is it gotta do with this part???
<script language="JavaScript">
config='toolbar=no,location=no,directories=no,status=no,menubar=no,width=500,height=300'
config += 'scrollbars=no,resizable=no'
pop = window.open ("","pop",config)
pop.document.write('<html><head><title>your title</title></head>');
pop.document.write('<script language="javascript">');
pop.document.write('setTimeout(');
pop.document.write('"self.close()');
pop.document.write(';",90000)');//關閉時間ms --->THIS PART???
pop.document.write('</');
pop.document.write('script>');
pop.document.write('<body bgcolor="FF972F" style="font:12pt; color:ffffff"><center>');
pop.document.write('watever you want to write<br />;
pop.document.write('</center></body></html>');
</script>
Can someone help...Thanks~!:)
tommysphone
10-07-2002, 03:23 PM
<script language="JavaScript">
config='toolbar=no,location=no,directories=no,status=no,menubar=no,width=500,height=300'
config='scrollbars=no,resizable=no'
pop = window.open ("","pop",config)
pop.document.write('<html><head><title>your title</title></head>');
pop.document.write('<script language="javascript">');
pop.document.write('setTimeout(');
pop.document.write('"self.close()');
pop.document.write('",90000)');
pop.document.write('</');
pop.document.write('script>');
pop.document.write('<body bgcolor="FF972F" style="font:12pt; color:ffffff"><center>');
pop.document.write('watever the message you want to type <br />');
pop.document.write('</center></body></html>');
</script>
I have no problems with the code above. NOTE - line one and 2 need to be on the same line - bring 2 up to one so stat becomes status
Sorry that you are stuck, can anyone do better than I?
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.