Execute SQL query on HTML form element ( Dropdown ) onchange event

29
April 22, 2019, at 03:50 AM

I have trying to execute SQL query when we change the dropdown values. Since we can't execute it using JavaScript , How can we do that. e.g. if 'A' is selected then it should go to some function which executes sql query with 'A' as an where condition. Is there anyway without using PHP/AJAX/JQuery

<%
// i want to execute this code when we select a dropdown value 
dropval= Request.Form("drop")
strSql = "select C1 from Table1 where Alphabet=  '"& dropval &"'"
Set ObjRs=ObjConn.Execute(strSQL)
Deal = ObjRs(column1)
%>
<HTML>
<form method="POST" Action="hello.asp"  name="Form1">
 <table>
<tr>
 <td>
  <select  name="drop" id="iddrop" onchange="">
    <option value="A">A</option>
    <option value="B">B</option>
    <option value="C">C</option>
     </select>     
 </tr>
</td>
<tr>
<td>
<input id="idDeal" type="text"  name="iDeal" 
 value="<%=Deal%> />
 </td>
</tr>
</table>
</form>
</HTML>
READ ALSO
Position of div children get wrong because of scale transform on div parent

Position of div children get wrong because of scale transform on div parent

I'm working on a react app where there is two columns face to face, each columns has rows insideEach rows of differents columns can be connect by one or many lines

51
Is it possible to add a two dot in a variable name in Javascript?

Is it possible to add a two dot in a variable name in Javascript?

i want to create a variable like this in javascript

26
Load images by mouseclick

Load images by mouseclick

I am trying do load apng file with p5

20
expo background push notfication in iOS

expo background push notfication in iOS

At first, I was worried that expo had a custom notification system (had me thinking "coulda had a p8", if you know the commercial like that, haha)In the end, I was impressed with how direct and easy sending messages with expo's push notification service...

28