If I have a dynamically generated table using javascript (and the
table changes based on various click events prior to form submit) and
I want to populate one of the table's <td></td> elements [with data
returned] from the server (after the form is submitted),
how do I do that?
Sure you can: with target, IFrame, and onload.
Evertjan notwithstanding, the first part is perfectly
good English, so I can't tell if the first part of the
response from The Netherlands was serious or an attempt
to point out that one might misread the OP's intent.
What strikes me as incongruous, though, is the really odd
construct of the OP's next two sentences (and especially
the first), which do not mesh with the prior ones. It is
frequently a form that occurs in homework problems.
For that reason I have kept my response minimal.
Csaba Gabor from Vienna
In your answer, please provide a suggestion as to
how this can be done.
Thanks for your time.
Isn't this the point of AJAX? The data returned from the server is an
xmlHTTPResponse and the data is there to do what you want with it. Am i
missing the point in the original question? For example, a call is made to
the server through a PHP script. I can simply build a string of data and
echo it back to the client making the call.
The javascript can them manipulate that data however I deem fit. As an
example, if I try and establish a connection to a database and en error is
returned, I can send a message back to the client and am able to access it
through responseText or responseXML. I can then populate a <div> using
innerHtml, for example.
If what the user is questioning was not possible, how else would I populate
a table of data that I recieve back from the server?
David