Richard Cornford wrote:
es*@harvee.org wrote:
You
may have some idea of what you are trying to do but everyone else is
going to have to guess. If you want help actually doing this you will
have to explain what it is you are actually trying to do.
what I'm trying to do is avoid writing any JavaScript yet still provide
the same degree of web page control that JavaScript provides. and yes,
I'm trying to avoid a full round-trip page reconstruction just like
JavaScript/Ajax. for what it's worth, I've gone to the same 90% case
simplification with HTML and cgi by extending aether in the akasha
project (google aether manual for a very rough idea)
in order to avoid writing JavaScript, I believe it is necessary to be
able to tell the server-side program something about the current state
of the region of interest. Region of interest can be a form, a div
area, or what ever you want to be. State is defined by keyvalue pairs.
The key is the DOM reference either full path or by ID. a full path
would be something like:
html>body>div#if_layout>div#if_body>div#btm
and id reference should be something as simple as: div#btm
associated with each key is some data element. It may be some HTML, it
may be the data inside of a form element. It really doesn't matter as
long as it's readable.
Associated with a button or some other form of screen element calling
the user to action, should be a set of keys. When that button is
pressed, the keys retrieve the data and are sent as a bundle to the
appropriate server-side action.
on return, a similar set of key value pairs would be returned and the
keys with specify where to place the data. So one could in theory
modify a small section of the web page to change what's visible etc..
That's what I'm trying to do. I've gotten some really good advice so
far or which I'm very grateful. As I have the time I'm going to
experiment with this technique. If it yields something, hooray. If it
doesn't, well there goes a few more hours I will never get back.
besides the fact that I have been burned so horribly by raw JavaScript,
what's motivating me is the desire to create a collaborative commenting
system for writers. I don't want editing because as an author, I want
to control the changes. But I do want reviewer's to comment on the
body of the text. The user interface would be something like
highlighting the information on the web page, doing some magic
incantation with the mouseto bring up a text area in a margin. They
edit their work in the text area, save it, and continue on. As an
author, I should be able to see the regions they have commented on and
the comments so I can decide to incorporate what's important.
again, web page displays document, reviewer highlights region, text
area becomes available, reviewer enters comments, comments saved,
author of use comments, author swears that reviewers are idiots.
that's what's motivating me right now. I want to build that but I
don't want to waste my time with JavaScript "quirks" if it's at all
possible.