Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Developing with DOM and XMLHttpRequest
December 10, 2004, 10:03 pm
rate this thread
I have to write a web program (not a web site) and I was exploring all
When I found XMLHttpRequest I decided to use it.
I'm interesting also in DOM, and I formuled this idea of a PHP framework:
for every page of the program:
- an XML file where there are all the static parts, and where the
dynamic part have to go (after a DB query, etc.) you put something like
- a .php file that initialize the dynamic data of the page, created with
DOM objects and with something like that (I don't know the correct
syntax, it's only an idea):
$doc = new DOMDocument("file.xml");
// DB query and $table creation with DOMElement and so on...
// and finally
$panel = $doc->getElementsByTag("where_the_table_have_to_go");
$t = $panel->createTextNode($table.saveHTML()); // I don't know if
TextNode is correct :)
When in the browser a change occours, the JS function call this file
to upgrade the desired node of the page. Finally he answers with
Is all that possible? Anyone knows if there are some libraries that uses
DOM and XMLHttpRequest together?
Is it possible to update only a node of a page with XMLHttpRequest?
Thank you a lot
- Tim Van Wassenhove
December 11, 2004, 6:34 am