Help on db input to innerHTML after cbo_onupdate()

Help on db input to innerHTML after cbo_onupdate()

am 02.02.2006 09:18:29 von nospam

Hi.
On an .asp page, after an user has changed the selected value in a combo box
(cboMyDistricts) I want the text in a textarea on the same page to change.
The text is retrieved from a recordset based on the cboMyDistricts value.

I know I can reload the same page with a input variable, but would really
like to do it through DHTML instead.

Can I through .js script change the innerHTML text on a text area, based on
certain record in a recordset?

Psaudo like this:


MyRecorset = dbConn.execute("SELECT txtDistrictText FROM tblDistricts ORDER
BY iDistrictID")






If some of you understand my issue or have more general tips on changing
text/content "on the fly" rather than by reloading the page, I'll be
intrested. I think some kind of array() keeping all the district text might
be a solution, but not quite sure how and where to populate the array, and
use it as a input to a innterHTML statement.

Please anyone.

Kind regards
Mr. Smith

Re: Help on db input to innerHTML after cbo_onupdate()

am 02.02.2006 10:43:33 von Anthony Jones

You should look in to using the XMLHTTP object.

See:- http://jibbering.com/2002/4/httprequest.html

You can use this to post a small request to the server containing just the
values you need and you can then
assign the response to the text area's innerText.

Anthony.