Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: Javascript and VBScript


Message #1 by f741r <f741r@u...> on Sun, 5 Aug 2001 20:03:28 -0300
Well, u can't run  sql statement from client side.
When u use event u R doing it in client side.
So u should have another asp page that runs the sql u like,
and need to call this page after u assign it the js variable.

Say the current page called: "first.asp", and second called "sqlStat.asp".

*********first.asp*****************
function someFunction()
{
  var whichDevice = MainForm.device.options
[MainForm.device.selectedIndex].value

window.location.href="sqlStat.asp?whichDeviceJS="+whichDevice;
}
**********************************
*************sqlStat.asp************
<%@ Language=VBScript %>
<HTML>...
<body>
<%
   dim whichdeviceVBS
   whichdeviceVBS=request("whichDeviceJS")
   strSQL = "SELECT * FROM someTable WHERE whichDeviceVBS ETC."

%>
</body>
</html>
************************************

  Return to Index