I've only just started playing with AJAX, as part of a project I'm dealing with at work.
The specific piece I'm stuck on at the moment is this:
I have a form with a lot of fields, two of which are subnet (a drop box populated from a database, via PHP) and IP address (a text input box). When the user selects a subnet, the value is sent to a PHP script that queries the DB and returns the next unused IP address. If all I wanted was to display that in a div next to the IP input box, I'd be set -- that works fine.
Unfortunately, I can't for the life of me figure out how to get the returned data into a text input box, which is what I actually want.
I know that document.getElementById("div_id").innerHTML=request.responseText; will display the text in a div in my sample code. I found a post somewhere that implied that frm.getElementById("input_id").value = request.responseText; would do the job for a text input, but it doesn't, at least in any of the browsers I've tested.
If anyone could point me in the right direction, I'd greatly appreciate it.
Thanks in advance,