Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

extend function to set value of text box

Status
Not open for further replies.

richey1

Technical User
Oct 5, 2004
184
GB
Hi

I have an asp with a drop-down box which onblur sets the values of other fields using a javascript function called selServiceChange.
I have another lookup table called ServiceWebLinks which has 2 columns SERVICEID and WebLink.
on my asp i have a text box called txtWebLink which the value of I'd like to populate using selServiceChange.
This is because the value of the Select for selService relates to the value of SERVICEID in table ServiceWebLinks.
so if the user choose tidal queries from the drop-down whose value is 100, there is a row in ServiceWebLinks with SERVICEID = 100 and WebLink = 'I'd like the value of txtWebLink to be '
thanks (hope i've made sense !)

jacq

Response.Write "<td><select name=selService onBlur=""selServiceChange();"">" & vbLf

Code:
Response.Write "function selServiceChange()" & vbLf
Response.Write "{" & vbLf
Response.Write "  document.frmEnquiry.txtAdder.value=arrTargets[document.frmEnquiry.selService.value];" & vbLf
Response.Write "  document.frmEnquiry.TargetDate.value = addDate(new Date(" & Year(Now()) & "," & Month(Now())-1 &  
"," & Day(Now()) & "),arrTargets[document.frmEnquiry.selService.value]);" & vbLf
Response.Write "}" & vbLf
Response.Write "</script>" & vbLf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top