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;
}
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