You are here: irt.org | FAQ | JavaScript | Frame | Q596 [ previous next ]
Try something like:
<script language="JavaScript"><!-- function create(data) { myWindow = window.open('frameset.htm?' + escape(data),'windowName','width=200,height=200'); } //--></script> <form onSubmit="create(this.form.data.value)"> <input type="text" name="data"> <input type="submit"> </form>
Where frameset.htm contains:
<html> <script type="text/javascript" language="JavaScript"><!-- var passed = ''; if (location.search) passed = unescape(location.search.substring(1)); document.write('<frameset cols="33%,33%,*">'); document.write(' <frame name="contents" target="main" src="contents.htm">'); document.write(' <frame name="title" target="main" src="title.htm">'); document.write(' <frame name="main" src="http://www.somewhere.com/cgi-bin/program.pl?'+ passed + '">'); document.write('<\/frameset>'); //--></script> </html>