[Javascript] window.close not working

Jessica Jessica at greenlight.co.uk
Mon Dec 6 03:12:30 CST 2004


 

Hi,

 

I have 2 windows, on button click of my 1rst window, I call the 2nd
window, which basically tracks button click & executes 

A script to write to the database. 

In the 2nd window I am calling a js file, which writes data to the db.

This works fine but I only want the window which calls the script 2 be
opened for a few seconds.

So after the script I have a window.close(). It does not write to the
database with the window.close.

So I put a setimeout() on my second window but it still does not write 2
the database. If I remove the window and manually close the window it
writes.

 

Window1

function srcLd()

{
window.open("ButtonClick.aspx","","width=1,height=1,top=700,scrollbars=0
,menubar=0,toolbar=0,location=0,status=0");

 }

 

Window2 (This is all window2 has and I need it open for a few seconds,
execute test.js which writes ordervalue to the db and then automatically
close)

 <form name="test">

                        <input type="text" name="orderValue" value="999"
>

            </form>

<script type="text/javascript" src="https://test.js"></script>       

 

<script language="javascript">

            setTimeout(self.close(),5000000000000)


</script>

 

Please assist.

jess

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20041206/926111a7/attachment.htm>


More information about the Javascript mailing list