Popup and set data?

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

    #16
    Re: Popup and set data?

    Greg G wrote:

    (snip)
    [color=blue]
    > [...] Is there not a utility to do
    > a sanity check on javascript?[/color]

    lol...I think you're searching for a 'sanity clause'. Bad news: there
    *is* no Sanity Clause.
    [color=blue]
    > Also, I was able to get the data across using a simplification of[/color]
    RobB's[color=blue]
    > technique. Since this is a single-purpose popup and is only going to[/color]
    be[color=blue]
    > called from one specific page, I did this, and it worked:
    >
    > window.onload = function()
    > {
    > var form = document.inform ation;
    >
    > form.phone.valu e = opener.phone_va lue;
    > }
    >
    > where phone_value is a global variable in the opening window.[/color]

    Don't omit the object checks, mandatory when scripting cross-window:

    window.onload = function()
    {
    var form = document.inform ation;
    if (form
    && opener
    && !opener.closed
    && 'undefined' != typeof opener.phone_va lue)
    form.phone.valu e = opener.phone_va lue;
    }

    Comment

    • kaeli

      #17
      Re: Popup and set data?

      In article <i92dnW1FSItqKc zfRVn-vg@ctc.net>, ggershSNACK@CAK Ectc.net
      enlightened us with...[color=blue]
      >
      > I'm still interesting in seeing this work. Is there not a utility to do
      > a sanity check on javascript? It seems crazy that there's no way to
      > debug what I've written.[/color]

      And I'm really curious why it doesn't work.
      Can you put complete test code (that fails for you) at a URL I can get to so
      I can see it whole?

      I wonder if it's something about your browser or ...?
      *scratches head*

      --
      --
      ~kaeli~
      Bakers trade bread recipes on a knead-to-know basis.



      Comment

      Working...