[thelist] check existence of a javascript function

Andrew Clover and at doxdesk.com
Thu Jan 24 11:36:52 CST 2002


> 2) if (!opener.getAppId) {
>         //do something else
>     } else {
>         appId = opener.getAppId();
>     }

This version is correct and should work as long as there actually is an
'opener' window. To be safe you could also check that the window was indeed
opened by JavaScript first:

  if ((opener) ? opener.getAppId : false)
    appId= opener.getAppId();
  else {
    // do something else
  }

-- 
Andrew Clover
mailto:and at doxdesk.com
http://and.doxdesk.com/




More information about the thelist mailing list