0

i only need this to work in i.e. and im sure it does but i am getting a "closed is null or not an object" exception message

declared in HEAD::

<script type="text/javascript">
  function reloadwin(w){
    if (w.closed) alert('window is closed')
    else return setTimeout('reloadwin()', 500)
  }
</script>

called in BODY

<script language='javascript'>reloadwin(w)</script>
2
Contributors
6
Replies
7
Views
9 Years
Discussion Span
Last Post by ~s.o.s~
0

i only need this to work in i.e. and im sure it does but i am getting a "closed is null or not an object" exception message

declared in HEAD::

<script type="text/javascript">
  function reloadwin(w){
    if (w.closed) alert('window is closed')
    else return setTimeout('reloadwin()', 500)
  }
</script>

called in BODY

<script language='javascript'>reloadwin(w)</script>

and sorry i call the window using this

<script language='javascript'>
  w=window.open('CIPFATree.aspx', 'CIPFA', 
  'width=360, height=160, status=yes, menubar=no, resizable=yes,
  'scrollbars=yes');
</script>
0

You need to post the entire code as it is for someone to help you out. Posting in bits and pieces would just make it difficult.

And BTW, that kind of error is normally given when the variable 'w' doesn't refer to any window, i.e. function is called before window is created.

0

very sorry. here we go.

<HTML>
  <HEAD>
  <script type="text/javascript">
    function reloadwin(w){
      if (w.closed) alert('window is closed')
      else return setTimeout('reloadwin()', 500)
    }
  </script>
  </HEAD>
  <BODY>
    <script language='javascript'>
      w=window.open('CIPFATree.aspx', 'CIPFA', 
          'width=360, height=160, status=yes, 
          menubar=no, resizable=yes,
          'scrollbars=yes');
      reloadwin(w);
</script>
  </BODY>
</HTML>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.