Hi all,
I'm pretty new to asp and I need your help here.
Have been trying to figure out this problem for the past 2 days..
I have a form, which requires the user to select a value from the combo box.
Once the value in the combbox changes, the textfields will be populated with the values which will be extracted from the database based on the combobox selection.
My code does not seem to be working.. please help..
=================recordset======================
set rsDetails=Server.createobject("ADODB.Recordset")
sqlStr="select InductionDate, CSR, CSO from CRM_CustomerSalesOrder where SON = '" & Request.QueryString("SON") &"'"
rsDetails.Open sqlStr, dbc
=================================================
===========combo box====================
<select size="1" name="cboSON" onchange="showDetails()">
========================================
=================JS function=====================
<Script language="Javascript">
function showDetails() {
window.location='main.asp?SON='+document.frmMain.cboSON.options[document.frmMain.cboSON.selectedIndex].value;
} </script>
================================================
==========textbox that is to be populated by value=====
<input type="text" name="txtCSR" size="50" value="<%=rsDetails("CSR")%>"></font></td>
======================================================
I'm pretty new to asp and I need your help here.
Have been trying to figure out this problem for the past 2 days..
I have a form, which requires the user to select a value from the combo box.
Once the value in the combbox changes, the textfields will be populated with the values which will be extracted from the database based on the combobox selection.
My code does not seem to be working.. please help..
=================recordset======================
set rsDetails=Server.createobject("ADODB.Recordset")
sqlStr="select InductionDate, CSR, CSO from CRM_CustomerSalesOrder where SON = '" & Request.QueryString("SON") &"'"
rsDetails.Open sqlStr, dbc
=================================================
===========combo box====================
<select size="1" name="cboSON" onchange="showDetails()">
========================================
=================JS function=====================
<Script language="Javascript">
function showDetails() {
window.location='main.asp?SON='+document.frmMain.cboSON.options[document.frmMain.cboSON.selectedIndex].value;
} </script>
================================================
==========textbox that is to be populated by value=====
<input type="text" name="txtCSR" size="50" value="<%=rsDetails("CSR")%>"></font></td>
======================================================