G
Guest
I am hoping a mixed ASP- Javascript programmer could help me with this
scenario:
I have a list box populated with randomized records (NewID()) from a Broker
(Salesperson) sql server table.
Each time the user selects one of the broker items I need to display a Image
of the broker in the table cell next to it.
I have found a number of online js scripts that use the image selector route
but I am unable to work out to populate the list
item from the database AND at the same time utilize the JS...
Are there any coders who come across a solution like this. Here is an
example of my ASP code populating the List box:
Set oCmd = GetStoredProcedure(oConn,"spr_GetBroker")
set oRS = oCmd.execute()
Response.write ("<TR><TD class=text><strong>Broker:</strong></TD><TD>")
Response.write "<select name='u_BrokerID' size='4'
onChange='generateimage(this.options[this.selectedIndex].value)'>"
'//Response.Write("<TR><TD
class=text><strong>Broker:</strong></TD><TD><SELECT NAME=u_BrokerID>")
If oRS.eof then
Response.Write("<option>No records found for Nation</option>")
else
while not oRS.eof
Response.Write("<OPTION VALUE=""" & oRS.fields(0) & """>" &
oRS.fields(1) & "</OPTION>")
oRS.movenext
wend
End If
Response.Write("</SELECT>")
I now need to load the images (from the imagePath inside my database ie
rs(3)) and then trigger an event to launch a new image
in the next table cell...
Appreciate any advice!!!
- Jason
scenario:
I have a list box populated with randomized records (NewID()) from a Broker
(Salesperson) sql server table.
Each time the user selects one of the broker items I need to display a Image
of the broker in the table cell next to it.
I have found a number of online js scripts that use the image selector route
but I am unable to work out to populate the list
item from the database AND at the same time utilize the JS...
Are there any coders who come across a solution like this. Here is an
example of my ASP code populating the List box:
Set oCmd = GetStoredProcedure(oConn,"spr_GetBroker")
set oRS = oCmd.execute()
Response.write ("<TR><TD class=text><strong>Broker:</strong></TD><TD>")
Response.write "<select name='u_BrokerID' size='4'
onChange='generateimage(this.options[this.selectedIndex].value)'>"
'//Response.Write("<TR><TD
class=text><strong>Broker:</strong></TD><TD><SELECT NAME=u_BrokerID>")
If oRS.eof then
Response.Write("<option>No records found for Nation</option>")
else
while not oRS.eof
Response.Write("<OPTION VALUE=""" & oRS.fields(0) & """>" &
oRS.fields(1) & "</OPTION>")
oRS.movenext
wend
End If
Response.Write("</SELECT>")
I now need to load the images (from the imagePath inside my database ie
rs(3)) and then trigger an event to launch a new image
in the next table cell...
Appreciate any advice!!!
- Jason