I have an ASP form (PO) that supplies an automatic purchase order and within that form are several fields. I want to take the values of 2 of them (vCity & vState) and pass them to a pop-up window which allows searching by city and state for our vendors from a SQL table.
On form PO I have:
[ul]
[/ul]
And on page Dt_Towers.asp I have:
[ul]
[/ul]
This is not working. I have NO experience with javascript, but I do know this is the best way to do what I need.
Can anybody help me???????
Scott
On form PO I have:
[ul]
Code:
<script language="JavaScript"><!--
function newWindow(file,window) {
msgWindow=open(file,window,'resizable=no,width=750,height=250');
if (msgWindow.opener == null) msgWindow.opener = self;
}
//--></script>
<form>
<input type="button" value="Locate Vendors" onClick="newWindow('forms/dt_towers.asp','window2')">
</form>
And on page Dt_Towers.asp I have:
[ul]
Code:
<script language="JavaScript"><!--
var strCity = opener.document.PO.vCity.value;
var strState = opener.document.PO.vState.value;
//--></script>
<%
Set rs=server.createobject("adodb.recordset")
sqlstmt="Select * from tblVendorList WHERE mail_st ='"&strState&"' and mail_city='"&strCity&"'; order by mail_City"
set conn=server.createobject("adodb.connection")
conn.open="Provider=SQLOLEDB;Data Source=HGSNQ002;User Id=devpw;Password=pwdev"
This is not working. I have NO experience with javascript, but I do know this is the best way to do what I need.
Can anybody help me???????
Scott