Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Brad Everman
December 11, 2006, 2:49 pm
rate this thread
Suppose I have a bunch of DOM objects (namely images) and want to pass the
attributes of these DOM objects to a PHP script. What is the easiest way
to accomplish this? Basically, I have a bunch of images that can be
after the user is done moving them. For instance, one of the attitbutes
might be dd.elements.circle1.h, where h is the height of the image named
circle1. This height is set when the page is loaded, but may change as the
user manipulates the circle. Would I be better off just writing a bunch of
form data then passing this to PHP? I vaguely remember seeing something
about manipulating session variables with Javacript.
Thanks for any help.
- Christoph Burschka
December 12, 2006, 8:27 am
XMLHttpRequest. Essentially, the script makes a call back to the server
(probably using POST, in your case, and sending the data manipulated
by the user), the server processes it and then returns a response that
the script can parse.
Note that even though it's called "XML", the request and response don't
need to be formatted as XML, which can save a lot of time if you haven't
worked with XML document definitions before.
This is somewhat helpful: http://en.wikipedia.org/wiki/XMLHttpRequest