|
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?
irt.org | Knowledge Base | JavaScript | Frame | Q596 [ previous next ]
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?
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?'
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.