|
Load SQL query results into a JavaScript array
I am trying to figure out Javascript code needed to build a table array, populate the array with results of a SQL query at page load, and will support a function which dynamically populates a text-area with data from the array based on a user's choice of a related option/select list.
Particulars related to this effort:
HTML:
option/select list named: "Subject"
textarea named: "Message"
SQL table to JavaScript Array:
RecID / Location / MsgTrigger / Subject / MsgInternal / MsgExternal
1
2
3
User action: Selects a subject text string, eg:Appointment Scheduled, from a drop-down select named "Subject".
Dynamic Action: MsgInternal (related to the "Subject") text needs to load into the textfield="Message", e.g.Appointment for <insert name> has been scheduled on <insert date/time> from the values found in the JavaScript array.
The above activity is performed within a Cold Fusion Page, running on IE 5.0+
Thanks,
ewill
|