K
Kamyk
Hello all!
Is there anybody who could help me. I have rewritten a code straigth from
the
book including a little bti of modifications, but unfortunately this code
doesn`t work.
I would like to create a main window, where after clicking on the button,
there
will be opened second window, where I will fill some string and after
clicking on
the ENTER key, this name value would be sent to the main window.
Where is the error in the following codes?
Thank you in advance
Marcin from Poland
----------------------------------------------------
parent window:
<HTML>
<HEAD>
<SCRIPT Language=JavaScript type="text/Javascript">
function otworz()
{
newWindow=window.open('JavaScript_okno_potomne.html','noweOkno','toolbar=yes
,location=yes,scrollbars=yes,width=300,height=200');
}
</SCRIPT>
</HEAD>
<BODY>
<H1>Witamy na stronie</H1>
<FORM name=formularzWy>
<INPUT type=text size=20 name="tekstPowitanie" value="">
<INPUT type=button name=kliczek onClick="otworz();" value="">
</FORM>
</BODY>
</HTML>
----------------------------------------------------
second window:
<HTML>
<HEAD>
<SCRIPT Language=JavaScript type="text/Javascript">
function aktualizujParent(TwojeImie)
{
opener.document.formularzWy.tekstPowitanie.value=twojeImie.value;
}
</SCRIPT>
</HEAD>
<BODY>
<H1> Jak masz na imie?</H1>
<FORM>
<INPUT name="twojeImie" type=text onBlur="aktualizujParent(this);" size=20>
</FORM>
</BODY>
</HTML>
Is there anybody who could help me. I have rewritten a code straigth from
the
book including a little bti of modifications, but unfortunately this code
doesn`t work.
I would like to create a main window, where after clicking on the button,
there
will be opened second window, where I will fill some string and after
clicking on
the ENTER key, this name value would be sent to the main window.
Where is the error in the following codes?
Thank you in advance
Marcin from Poland
----------------------------------------------------
parent window:
<HTML>
<HEAD>
<SCRIPT Language=JavaScript type="text/Javascript">
function otworz()
{
newWindow=window.open('JavaScript_okno_potomne.html','noweOkno','toolbar=yes
,location=yes,scrollbars=yes,width=300,height=200');
}
</SCRIPT>
</HEAD>
<BODY>
<H1>Witamy na stronie</H1>
<FORM name=formularzWy>
<INPUT type=text size=20 name="tekstPowitanie" value="">
<INPUT type=button name=kliczek onClick="otworz();" value="">
</FORM>
</BODY>
</HTML>
----------------------------------------------------
second window:
<HTML>
<HEAD>
<SCRIPT Language=JavaScript type="text/Javascript">
function aktualizujParent(TwojeImie)
{
opener.document.formularzWy.tekstPowitanie.value=twojeImie.value;
}
</SCRIPT>
</HEAD>
<BODY>
<H1> Jak masz na imie?</H1>
<FORM>
<INPUT name="twojeImie" type=text onBlur="aktualizujParent(this);" size=20>
</FORM>
</BODY>
</HTML>