I am using a javascript onClick command to issue the new request each time the value changes. Then I am running asp code inside the javascript code to pull the value of the selected dropdown item and then pass it to my SQL SP. Then once I get the return values I pass them back to the javascript to populate span tags. It all works if i manually input a value for varID, but then what would be the point. If I could find a way to call the SQL SP from javascript or pass the value to VBScript from Javascript, then this would be a non issue. Below is the error i am receiveing and the code sniplet.
Thanks for your help,
Brian
I get this error when calling from VBscript:
Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/APS-Online/Customer/aaa.asp, line 17, column 45
varID = document.ClientErrCheck.PHY_1.options[document.ClientErrCheck.PHY_1.selectedIndex].value
--------------------------------------------^
Code snip:
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function PHY_1_onchange() {
if (!(document.ClientErrCheck.PHY_1.selectedIndex == ""

){
<%
Dim varID, strAddress
varID = document.ClientErrCheck.PHY_1.options[document.ClientErrCheck.PHY_1.selectedIndex].value
"....SQL stored procedure.....
Set prm1 = cmdGetCust.CreateParameter("@ID",adInteger,adParamInput,,varID)
cmdGetCust.Parameters.Append prm1
Set prm5 = cmdGetCust.CreateParameter("@Address",adVarChar,adParamOutput,50,strAddress)
cmdGetCust.Parameters.Append prm5
"
Response.write "var varAddress = " & chr(34) & strAddress & chr(34) & ";"
%>
window.ADD_1.innerText = varAddress
}
}
//-->
</SCRIPT>