[Zope] "just html", help, help, help !!!

Marcel Preda marcel@punto.it
Mon, 10 Jul 2000 12:25:41 +0200


----- Original Message -----
From: Vincent Maton <vmaton@belgium.aton.net>
To: Zope <Zope@zope.org>
Sent: Monday, July 10, 2000 11:10 AM
Subject: [Zope] "just html", help, help, help !!!


> Hello,
>
> Can you help me ???
>
> I have one page with a "form", in this page I have an "OnClick" who open a
> new page who have some informations and when I "Submit" (I think that I must
> use a form also in this page to send the informations to the first page), I
> want to receive the informations on the first page, in a input or something
> else ???
>
> We are three people for find the answer but we don't find the way, this is
> why I call you...


The key is `opener' propery of `window'object
(browser must be capable JavaScript 1.1)
I have tested it - just for you :) - with IE5 and NN4.61

Just a draft:

The parent HTML:

<HTML>
<BODY>
<FORM NAME=aForm>
<INPUT TYPE=TEXT VALUE="DEFAULT">
</FORM>
<A HREF="anInvalidLink" OnClick="window.open('child','childWindow');return
false;">A link to a child</a>
</BODY>
</HTML>


The child:

<HTML>
<BODY>
<SCRIPT>
function setInParent(aString)
{
 window.opener.document.forms[0].elements[0].value=aString;
}
</SCRIPT>
<FORM NAME=childForm
OnSubmit="setInParent(document.childForm.elements[0].value)">
<INPUT TYPE=TEXT VALUE="DEFAULT_CHILD">
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>


PM


_______________________________
"Will I be using Python today?"
 and if the answer is "yes"
 I know that it's going to be a good day.