On Sun, 18 Apr 2004 01:39:40 GMT, Reply Via Newsgroup
<reply-to-newsgroup@please.com> wrote:
[snip]
[color=blue]
> If my 'alert()' function call in test one is set to "hello" - it works -
> but if I ask it to give me tthe value of a form field in the popup
> window called formFieldname - it tells me that
> kid.document.formName.fieldname.value has no properties...[/color]
Have you actually determined which object is undefined (if it's not
explicitly stated in the message)? That is, have you tried
alert( kid );
then
alert( kid.document );
and so on until you get "undefined" displayed?
[color=blue]
> I believe the problem I am having is beacuse the script sits in the
> parent window and its being called from the child - and I'm muddling up
> the window references on how one see's the other.[/color]
I would think that the simplest solution would be to pass references to
the function during the call, then it wouldn't matter where the elements
are located. For example:
<button type="submit" onclick="return opener.testone(this.form)"[color=blue]
>Submit</button>[/color]
function testone( form ) {
alert( form.fieldname.value );
// ...
}
Of course, this depends on the functions you're designing, what data
they're accessing, and the architecture of the site.
Good luck,
Mike
--
Michael Winter
M.Winter@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)