Function Exists -- Parent Window

Discussion in 'Javascript' started by crazy_nelly, Sep 3, 2003.

  1. crazy_nelly

    crazy_nelly Guest

    To validate that a function exists on the page, one must simply use the
    syntax:
    if ( window.funcName ) //...

    However, the same syntax does not seem to work when attempting to validate
    that a function exists on a parent window of a popup.

    if ( window.opener.funcName ) //...

    Is there a syntax that works for this? I've tried everything I can think
    of. TIA~ PJ
    crazy_nelly, Sep 3, 2003
    #1
    1. Advertising

  2. "crazy_nelly" <> writes:

    > However, the same syntax does not seem to work when attempting to validate
    > that a function exists on a parent window of a popup.
    >
    > if ( window.opener.funcName ) //...


    It should. Try again! :)
    Seriously, you fail to say how you test it and how it fails. Does it
    give false positives or false negatives?

    > Is there a syntax that works for this? I've tried everything I can think
    > of.


    This should work, if the code is correct. Show us the code (just a link
    to a page that shows the problem would be fine), and we'll see if we can
    find the bug.

    /L
    --
    Lasse Reichstein Nielsen - Art D'HTML:
    <URL:http://www.infimum.dk/HTML/randomArtSplit.html> 'Faith without
    judgement merely degrades the spirit divine.'
    Lasse Reichstein Nielsen, Sep 3, 2003
    #2
    1. Advertising

  3. crazy_nelly

    crazy_nelly Guest

    Sorry, the page is not published yet and the site is not publically
    accessible.

    I found my issue...the function was inside the closing bracket of the
    function b4 it. doh!

    Thanks~

    "Lasse Reichstein Nielsen" <> wrote in message
    news:...
    > "crazy_nelly" <> writes:
    >
    > > However, the same syntax does not seem to work when attempting to

    validate
    > > that a function exists on a parent window of a popup.
    > >
    > > if ( window.opener.funcName ) //...

    >
    > It should. Try again! :)
    > Seriously, you fail to say how you test it and how it fails. Does it
    > give false positives or false negatives?
    >
    > > Is there a syntax that works for this? I've tried everything I can

    think
    > > of.

    >
    > This should work, if the code is correct. Show us the code (just a link
    > to a page that shows the problem would be fine), and we'll see if we can
    > find the bug.
    >
    > /L
    > --
    > Lasse Reichstein Nielsen - Art D'HTML:
    > <URL:http://www.infimum.dk/HTML/randomArtSplit.html> 'Faith without
    > judgement merely degrades the spirit divine.'
    crazy_nelly, Sep 3, 2003
    #3
  4. > Sorry, the page is not published yet and the site is not publically
    > accessible.
    >
    > I found my issue...the function was inside the closing bracket of the
    > function b4 it. doh!


    You might want to use jslint to help find things like that.
    http://www.crockford.com/javascript/lint.html
    Douglas Crockford, Sep 3, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Totan
    Replies:
    0
    Views:
    923
    Totan
    Apr 17, 2006
  2. Bhishm
    Replies:
    2
    Views:
    789
    bruce barker
    Sep 3, 2007
  3. Ulf Meinhardt
    Replies:
    8
    Views:
    6,118
  4. PWalker
    Replies:
    1
    Views:
    130
    David Lionetti
    Feb 24, 2005
  5. Bhishm
    Replies:
    2
    Views:
    207
    Thomas 'PointedEars' Lahn
    Sep 4, 2007
Loading...

Share This Page