Hi
I have an asp form, with a select box (selService) and a text box (txtWebLink). the select box holds a series of values, that dependent on the value selected I want the text box to updated based on the select value.
I have a look-up table (CCCu_ServiceWebLinks) with 2 columns ServiceID,WebLink - with values such as
117,118,127,
say the user selects the value 117 from the select list (selService), I would like, using onblur for example, to go away, look up the corresponding value in CCCu_ServiceWebLinks and put in the text box.
my vbscript is something like this at the moment, but i want to do this using javascript so i can call the onblur event from the select box
any ideas ?
thanks
I have an asp form, with a select box (selService) and a text box (txtWebLink). the select box holds a series of values, that dependent on the value selected I want the text box to updated based on the select value.
I have a look-up table (CCCu_ServiceWebLinks) with 2 columns ServiceID,WebLink - with values such as
117,118,127,
say the user selects the value 117 from the select list (selService), I would like, using onblur for example, to go away, look up the corresponding value in CCCu_ServiceWebLinks and put in the text box.
my vbscript is something like this at the moment, but i want to do this using javascript so i can call the onblur event from the select box
any ideas ?
thanks
Code:
dim rsWebLink
set rsWebLink = Server.CreateObject("ADODB.Recordset")
dim lngServID, WebLink1
lngServID = Request("selService")
if isnull(lngServID) then
set rsWebLink = execqueryRS_X("CONN_W", "select * from CCCu_ServiceWebLinks where SERVICEID=0",null)
else
if lngServID = "" then
set rsWebLink = execqueryRS_X("CONN_W", "select * from CCCu_ServiceWebLinks where SERVICEID = 0",null)
else
set rsWebLink = execqueryRS_X("CONN_W", "select * from CCCu_ServiceWebLinks where SERVICEID =
?",array(adnumeric,5,lngServID))
end if
end if
WebLink1 = rsWebLink("WEBLINK")