Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q596 How can I create a three framed frameset in a new window and pass the text entered in a form as the parameters to a perl program to be displayed in one of the frames?

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>

Feedback on 'Q596 How can I create a three framed frameset in a new window and pass the text entered in a form as the parameters to a perl program to be displayed in one of the frames?'

©2018 Martin Webb