I finally managed to play around with JPSpan
written by Harry Fuecks. āJPSpan provides tools to āhook up' PHP and
Javascript, for the purpose of fetching data from PHP into a web page
which has already loaded, without reloading the entire page.ā This
basically means you can call āremoteā PHP methods from within
JavaScripts and takes the LiveSeach
idea one step further. It's very easy to use and you get for example the result of a DB query from
within JavaScript with a few lines of code.
I can imagine a lot of uses for this. An immediate one is for
more āintelligentā forms in the admin interface. For example for
automatic checking of correct URIs (which has to be checked against the
existing URIs in the DB and can't be done with a simple Regex)
But my master plan is, to replace the whole submit/save/reload circle
with a more ānaturalā way. So if you click āsubmitā, the page isn't
send, but just the data in the background. The page has not to be
reloaded and you just can work further on the same document. The same should go for loading
a new record entry, just choose it from an (automaticly retrieved)
pop-down field and the data is loaded from the network, without having
to reload the whole page.
Our current forms interface for DB entries in the admin of BxCMS is
ages old and needs a decent rewrite. Let's see, if we can do something
really cool with JPSpan and hopefully patForms. The same goes for the
blog admin interface.
Unfortunately, JPSpan doesn't currently run on Safari. I'll have to
dig into the sources, or someone should just donate Harry a Mac ;)
Update: It works on Safari. Was a 4 letter hack on the server side (The solution should show up on the JPSpan maillist archive in a few minutes)
Update II: Of course, GMail was one of the first, which brought this
technique to widespread use and awareness. Urs sent me some links about
this topic:
ā Mark Pilgrim