As a learning exercise I'm writing a small application but I've hit a small problem and I'd like some help.
I have a form. On the form is a selection box. When the user selects one of the options the cursor moves onto the next input box. The bit that's missing is the bit that pre-populates this input box after the selection was made but before the cursor hits the input box.
I'd like to use "onblur" (when the user leaves the selection box) to call an MS-SQL stored procedure with the selected option as a parameter and pre-populate the input box with a returned value.
For information, I already have a connection (objConn) and I access stored procedures like this elsewhere in my application:
set cmd=Server.CreateObject("ADODB.Command"
cmd.ActiveConnection = objConn
cmd.CommandType = adCmdText
set rsDeviceNames = Server.CreateObject("ADODB.Recordset"
cmd.CommandText = "GetDeviceList '" & session("SiteID" & "'"
set rsDeviceNames = cmd.Execute
I then harvest the data from the returned recordset as required.
[sig][/sig]
I have a form. On the form is a selection box. When the user selects one of the options the cursor moves onto the next input box. The bit that's missing is the bit that pre-populates this input box after the selection was made but before the cursor hits the input box.
I'd like to use "onblur" (when the user leaves the selection box) to call an MS-SQL stored procedure with the selected option as a parameter and pre-populate the input box with a returned value.
For information, I already have a connection (objConn) and I access stored procedures like this elsewhere in my application:
set cmd=Server.CreateObject("ADODB.Command"
cmd.ActiveConnection = objConn
cmd.CommandType = adCmdText
set rsDeviceNames = Server.CreateObject("ADODB.Recordset"
cmd.CommandText = "GetDeviceList '" & session("SiteID" & "'"
set rsDeviceNames = cmd.Execute
I then harvest the data from the returned recordset as required.
[sig][/sig]