Function Exists -- Parent Window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • crazy_nelly

    Function Exists -- Parent Window

    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.f uncName ) //...

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


  • Lasse Reichstein Nielsen

    #2
    Re: Function Exists -- Parent Window

    "crazy_nell y" <you@wish.com > writes:
    [color=blue]
    > 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.f uncName ) //...[/color]

    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?
    [color=blue]
    > Is there a syntax that works for this? I've tried everything I can think
    > of.[/color]

    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 - lrn@hotpop.com Art D'HTML:
    <URL:http://www.infimum.dk/HTML/randomArtSplit. html> 'Faith without
    judgement merely degrades the spirit divine.'

    Comment

    • crazy_nelly

      #3
      Re: Function Exists -- Parent Window

      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" <lrn@hotpop.com > wrote in message
      news:he3t38y2.f sf@hotpop.com.. .[color=blue]
      > "crazy_nell y" <you@wish.com > writes:
      >[color=green]
      > > However, the same syntax does not seem to work when attempting to[/color][/color]
      validate[color=blue][color=green]
      > > that a function exists on a parent window of a popup.
      > >
      > > if ( window.opener.f uncName ) //...[/color]
      >
      > 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?
      >[color=green]
      > > Is there a syntax that works for this? I've tried everything I can[/color][/color]
      think[color=blue][color=green]
      > > of.[/color]
      >
      > 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 - lrn@hotpop.com Art D'HTML:
      > <URL:http://www.infimum.dk/HTML/randomArtSplit. html> 'Faith without
      > judgement merely degrades the spirit divine.'[/color]


      Comment

      • Douglas Crockford

        #4
        Re: Function Exists -- Parent Window

        > Sorry, the page is not published yet and the site is not publically[color=blue]
        > accessible.
        >
        > I found my issue...the function was inside the closing bracket of the
        > function b4 it. doh![/color]

        You might want to use jslint to help find things like that.


        Comment

        Working...