Hello,

I originally posted this at the Perl Category. But I think I should have posted it here. I think I will get more responses. I am requesting the other thread be closed. I apologize for any problem this may have caused.

I am trying to get a pop up window of a chat "login" window to close spontaneously after the chat window comes up. Please go to the following page and click the "CHAT" link in the lower left column to see what I am referring to.
IRONSTONE Example 1

If I do not make the "login" panel a pop up window and place it into a page instead, the login panel goes back to the previous page I was on and the Chat window pops up.
IRONSTONE Example 2

What code could I place into the pop up "login" window in Example 1 above to get it to close after the chat window opens???

The code is within the perl code for the Chat Script. I have placed the code at
http://www.ironstone.f2s.com/bluechat.txt (I placed "txt" as the extension so the text would be visible. The extension is actually "cgi"

I think it is the Java Script parts in the Configuration area and HTML as well as the Submit (Input Tag) Part of the code which need to be changed. I do not know how to do it.

JavaScript in the Configuration part of "bluechat.cgi (bluechat.txt)
Code:
$additional = '<p><strong><I><a href="javascript:history.back();">Go Back</a></strong></I></p>';
Java Script in the HTML Part
Code:
<!--
function LogIn(){
var MyWindow;
var MyUrl;
if (!document.forms[0].cname.value) {alert('You need to enter a name to use'); return;}
MyUrl = 'bluechat.cgi' + '?cname=' + escape(document.forms[0].cname.value);
MyWindow = window.open(MyUrl, "BlueChat", "STATUS=NO,TOOLBAR=NO,LOCATION=NO,DIRECTORIES=NO,COPYHISTORY=NO,MENU=NO,RESISABLE=NO,SCROLLBARS=NO,TOP=50,LEFT=20,WIDTH=600,HEIGHT=500");
window.history.back();
}
// --></script>
Input Tag Part
Code:
<input type="button" value="Login" onclick="javascript:LogIn();">
Entire Page Script
Code:
<html>
<head>
<title>IRONSTONE Chat</title>
<script language="JavaScript"><!--
function LogIn(){
var MyWindow;
var MyUrl;
if (!document.forms[0].cname.value) {alert('You need to enter a name to use'); return;}
MyUrl = 'bluechat.cgi' + '?cname=' + escape(document.forms[0].cname.value);
MyWindow = window.open(MyUrl, "BlueChat", "STATUS=NO,TOOLBAR=NO,LOCATION=NO,DIRECTORIES=NO,COPYHISTORY=NO,MENU=NO,RESISABLE=NO,SCROLLBARS=NO,TOP=50,LEFT=20,WIDTH=600,HEIGHT=500");
window.history.back();
}
// --></script>
</head>
<body bgcolor="" text="#F1EAD3" link="#FFCC00" vlink="#E6C45E" alink="#FFD66B" "background="stone_txt_bg_300x200.jpg"">
<TABLE WIDTH="450" CELLPADDING="5" CELLSPACING="0" BORDER="0" BGCOLOR="#A37951">
<TR>
<TD>
<p align="center"><font color="#F1EAD3"><strong><big><big>Welcome to IRONSTONE Chat</big></big></strong></font></p>
<p>RULES<br>1. No Chat with Foul Language and/or Sexual Content allowed in any Channel.<br>2. No Flaming allowed in any Channel.<br><br>CHAT ROOMS<br>&nbsp;&nbsp;&nbsp;&nbsp;Child Support<br>&nbsp;&nbsp;&nbsp;&nbsp;Spousal Support<br>&nbsp;&nbsp;&nbsp;&nbsp;Divorce<br>&nbsp;&nbsp;&nbsp;&nbsp;Separation<br>&nbsp;&nbsp;&nbsp;&nbsp;Single Parents<br>&nbsp;&nbsp;&nbsp;&nbsp;Pro Se<br>&nbsp;&nbsp;&nbsp;&nbsp;Anything Chat<br></p>
<form onsubmit="javascript:{return false;}">
  <div align="center"><center><p><b>Enter a name to use while chatting</b><br>
  <input type="text" name="cname" size="20"><br>
  <input type="button" value="Login" onclick="javascript:LogIn();"></p>
  </center></div>
</form>
</td>
<td bgcolor="#F1EAD3">
<p align="center"><strong><font size="2" color="#A37951">Color Codes<br> Allowed in name:</font><br>
<strong><font color="#0000A8">`1</font> <font color="#007000">`2</font> <font
color="#008080">`3</font> <font color="#A80000">`4</font> <font color="#A800A8">`5</font> <font
color="#A85400">`6</font> <font color="#808080">`7</font> <font color="#505050">`8</font> <font
color="#5454FC">`9</font> <font color="#00B000">`0</font> <font color="#00A0A0">`!</font> <font
color="#FC5454">`@</font> <font color="#FC54FC">`#</font> <font color="#AAAA00">`$</font> <font
color="#000000">`%</font></strong><br>

<font size="2" color="#A37951">Use and type <font size="4" color="#A37951">`</font> mark in top left button on keyboard.<br>
<I>Example:</I><br> `1James = <font color="#0000A8">James</font></strong></p></font>
</td>

<td align="center">
<p><b><p><strong><I><a href="javascript:history.back();">Go Back</a></strong></I></p>Please continue to surf  &nbsp;&nbsp; IRONSTONE while chatting.<br><strong><a href="/disclaimer.html"><font color="#FF9900">Disclaimer</font></a></strong></b></p>
<p><em><small>Version 2.3</small></em></p>
</TD>
</TR>
</TABLE>
</body>
</html>
Any and all input and help appreciated.

WP