Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Assigning the value of a javascript variable to a vbscript variable


Message #1 by "Linda L. Warren-Williams" <llwarrenwilliams@y...> on Tue, 20 Feb 2001 18:35:49
How do I assign the value of a javascript variable to a vbscript variable.

For example:
<SCRIPT LANGUAGE="JavaScript">
function display(thisValue,make)
{
  var selvalue;
  var noption;
  noption = 0;
  selvalue = document.forms[0].cpccoffice.options[document.forms
[0].cpccoffice.selectedIndex].value;
  document.forms[0].cpccCostcenter.length = 0;
  alert (selvalue);
  alert ( document.forms[0].cpccCostcenter.length); 
  
  <%
  
   dim conn,sql,rst,myconn,stroffice

   stroffice =selvalue  'I want the variable (stroffice to be equal to the 
value of selvalue.
     sql = "Select costcenter from dbo.view_OfficeCostCtrName WHERE 
office=" & stroffice
     %>
   alert("<%=stroffice%>");
}
  
</SCRIPT>

  Return to Index