Click to See Complete Forum and Search --> : Help posting javascript database search results in a pop-up window.


bunttodd
11-04-2004, 10:24 PM
I'm using the following script to search a database on a different server and post matching results:

<script language="JavaScript">
function validate() {
var d = document ;
var errMsg = "" ;

if( d.orderTrace.custFName.value == "" )
errMsg += "First Name cannot be blank\n";
if( d.orderTrace.custLName.value =="" )
errMsg += "Last Name cannot be blank\n";
if( errMsg )
window.alert( "Did not submit because of the following error(s):\n\n" + errMsg )
else
d.orderTrace.submit() ;
}
</script>

<form name="orderTrace" action="http://fcp.somesite.com/trace/" method="post" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="clientID" value="201">
<input type="hidden" name="action" value="trace">
First Name:<input type="text" size="23" name="custFName";>
Last Name:<input type="text" size="23" name="custLName";>
<input type="button"; value="Track Order(s)" onClick="javascript:validate()">
</form>

The twist is that I need to post the results in a resizable pop-up window. Any ideas???

Jona
11-05-2004, 12:38 AM
<form ... target="child">

bunttodd
11-05-2004, 04:59 AM
Thanks, but I was hoping for a controlled pop-up window

Jona
11-05-2004, 10:26 AM
You would have to open the page with the form on it (the one you posted) in a new window first, since the method is POST and not GET.