Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection between windows 1

Status
Not open for further replies.

Suppy

Technical User
Jul 22, 2002
12
RO
Hy. I have 2 windows. The first one contains an html form (with an button input and an text input with value="") which creates the second one(with window.open).
the second one contains some hrefs and a script.
<script language=&quot;JavaScript&quot;>
<!--
function closewindow(a)
{
window.close(&quot;\\Maximus\WebServerRoot\ window.opener.document.open();
window.opener.document.write(a);

window.opener.document.close();
window.opener.close();

}
//-->
</script>

<p align=&quot;left&quot;></p>
<a href=&quot; onClick=&quot;closewindow('GoRomania')&quot; ><span id=&quot;s1&quot;> GoRomania</span></a>
<p align=&quot;left&quot;></p>
<a href=&quot; onClick=&quot;closewindow('Go4Global')&quot;><span id=&quot;s2&quot;> 4Global</span></a>



and i want the script to write in the first window text input value(input type=text value=&quot;goromania&quot;-)
in other words &quot;&quot; to become&quot;goromania&quot; or &quot;go4global&quot;
 
hi Suppy,

in the opener window, name the text field. in the new window, use this syntax to change that text field's value:

opener.document.forms[0].textFieldName.value = &quot;whatever&quot;; =========================================================
if (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top