document.getElementById(txtid) has no properties error
- From: noddy <noddy@xxxxxxxxxxx>
- Date: Sat, 31 Mar 2007 22:51:23 +1200
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 <div> the 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
.
- Follow-Ups:
- Re: document.getElementById(txtid) has no properties error
- From: Evertjan.
- Re: document.getElementById(txtid) has no properties error
- Prev by Date: Re: printing an <html> ... </html> string using <href>
- Next by Date: Re: document.getElementById(txtid) has no properties error
- Previous by thread: printing an <html> ... </html> string using <href>
- Next by thread: Re: document.getElementById(txtid) has no properties error
- Index(es):
Relevant Pages
|