I am using the following code in an ASP Snippet to create a dropdown box on my Edit page:
categories_list = "<select style=""width:450px""><option value=""CommentBank"">Comment Bank</option>"
str = "Select Statement, Statement2 From SBank_tbl"
Set rstmp = server.CreateObject("ADODB.Recordset")
rstmp.open str,dbConnection
while not rstmp.eof
categories_list = categories_list & "<option value="""" Title=""" & rstmp("Statement") & rstmp("Statement2") & """>" & rstmp("Statement") & rstmp("Statement2") & "</option>"
rstmp.MoveNext
wend
rstmp.close
set rstmp=nothing
Response.write categories_list & "</select>"
I now want to add an OnClick event to this code so when I click on a value from the dropdown box that value will be copied on to the end of the text already entered in to another field (field is a textarea called 'Comment').
How can I modify the code to achieve this?
Thanks