NYCPHP Meetup

NYPHP.org

[nycphp-talk] Automatically create an object from a form

Dan Cech dcech at phpwerx.net
Tue Oct 19 12:17:17 EDT 2004


Christopher Merlo wrote:
> Thank you, Chris and Dan, for your quick answers.  I've realized that
> I left something out of the original question.  I'd like to change the
> object without having to reload the page, or even hit a submit button
> -- just on the action of changing the pull-down.
> 

it can be done, but you need to have a way of communicating with the 
server other than through the regular request->response cycle.  for 
example you could use a JavaScript XMLRPC client to make an XMLRPC 
request to the server which would then update the object.

However, this begs the question why?  If you want to change an object on 
the server without being able to see the results of the change what is 
the point?

If you are trying to populate a form dynamically without the overhead of 
reloading the whole page, then you are going to have to make a 
round-trip to the server of some kind.  One way to do this is using 
Harry Fuecks project ScriptServer (currently pending name change), which 
you can read more about here:

http://xmlrpccom.sourceforge.net/scriptserver/scriptserver/docs/scriptserver.html
http://www.sitepoint.com/blog-view.php?blogid=9

I guess we need to know more about exactly what functionality you're 
trying to achieve to be able to give you any more meaningful advice.

Dan



More information about the talk mailing list