Results 1 to 2 of 2

Thread: NEW to JavaScript, easy question

  1. #1
    Join Date
    Dec 2005

    NEW to JavaScript, easy question

    I am new, so bear with me.....
    I have a contact form.....then you click submit......it opens a new page that displays "message has been sent" then it redirects you based on this code

    <script>function update(){top.location='index.html';}var refresh=setInterval('update()',5000);</script>

    My Question is how can i change this code to CLOSE the "Message Sent Page" rather than REdirecting you? Thank You for any help.

  2. #2
    Join Date
    Dec 2003
    Bucharest, ROMANIA
    <script type="text/javascript">
    onload= function(){
    Unfortunately for you this will work for IE only (and with an alert message included, nothing to do about it). Mozilla will simply refuse close a window if the window is not opened using javascript methods. This is it. You should try to manage this from a server-side level.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center