I need to retrieve some notes from a database, allow users to modify
them and then return them to the database.I have done this
satisfactorily using php.However I would like to do it using AJAX.
To this end I have a <divthe innerhtml for which is sent from a php
file. The innerhtml constructs and fills a series of textareas and
provides each with an id.
When I want to return the modified note to the database and try to
copy the text displayed in a text area with the line
var txt=document.getElementById(txtid).value;
or
var txt=document.getElementById(txtid).text;
I get the error
document.getElementById(txtid) has no properties
When I try
var txt=document.getElementById(txtid);
txt gets the null value.
I would be grateful if someone could explain the basis of my error and
how I can get the text string back out of these text areas.
TIA
N