[thelist] check existence of a javascript function

Warden, Matt mwarden at mattwarden.com
Thu Jan 24 10:25:15 CST 2002


On Jan 24, Emily E Liang had something to say about [thelist] check...

>Hi,
>
>I'm trying to figure out how to check the existence of a javascript
>function in the opener window.  I tried all of the following and none
>seemed to work.  All returned a javascript error of "opener.getAppId()
>is not a function" error when the junction does not exist.  Any help is
>greatly appreciated!!!
>
>1) if (opener.getAppId() == undefined) {
>        //do something else
>    } else {
>        appId = opener.getAppId();
>    }

I'm thinking you're close here. try using the === operator:

if (opener.getAppID() === undefined)
{
...
}
else
{
...
}

.. though i can't find any documentation on it, so maybe i need more
coffee.

hth,

--
mattwarden
mattwarden.com






More information about the thelist mailing list