Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_objects thread: Accessing form values in a child window


Message #1 by "Les Bate" <les.bate@s...> on Wed, 12 Mar 2003 12:52:33
	In your statement, newWin is the new window's JavaScript name while
NewOne is the HTML name, and it's most of the time the main cause of
confusion and problem.

	It's advised to use the same name.  Or else make sure you're using
the name in JavaScript, like this :

newWin.document.form_name.element_name

	Also, don't forget that forms are attached to document, not window.

	HTH

> -----Original Message-----
> From: Les Bate [mailto:les.bate@s...] 
> Sent: mercredi 12 mars 2003 13:53
> To: JavaScript Objects
> Subject: [javascript_objects] Accessing form values in a child window
> 
> 
> Hi All
> 
> I know that if you open a new window with JavaScript and use 
> document.write's to create a form in the new child window 
> that you can 
> then access those form elements from the parent window.
> 
> However, if you open a new child window like this:
> 
>     newWin = window.open("newwindow.htm", "NewOne", 
> "height=400 width=500);
> 
> Then you do not appear to be able to access the form elements 
> in the child 
> window.
> 
> Does anyone know why or how to get around this?
> 
> Thanks
> 
> Les  :o)
> 
> 

  Return to Index