L
lcplben
Hi folks --
Consider a table column whose attributes the user can change. Beyond
changing the usual -- font-size, say -- he can indicate the sort order
of the values in the column. This needs (I think) an added attribute,
call it "sortOrder." So for column c the code might say:
c.setAttribute( "sortOrder", "descending" );
Now the user decides to reload the page and the table with its newly-
characterized column. What happens to sortOrder? It must evaporate,
right?
Well, I might preserve sortOrder by shipping that attribute to the
server when the user enters it. At reload time, that value is known by
my CGI. No problem. The CGI gets busy constructing the page to answer
the reload request, including filling in the sortOrder attribute. So
far so good.
But when the page gets to the browser, I think that sortOrder, a
mystery attribute to the browser, will /again/ disappear, so the
user's earlier work is lost, correct?
I could put sortOrder in the column's title attribute and send that to
the CGI. What a pain, though, to parse that thing coming in to the
client at onload time.
Now, finally, the question: short of using cookies, can you think of a
way to retain an added attribute over a page reload?
Thanks!
-- ben
Consider a table column whose attributes the user can change. Beyond
changing the usual -- font-size, say -- he can indicate the sort order
of the values in the column. This needs (I think) an added attribute,
call it "sortOrder." So for column c the code might say:
c.setAttribute( "sortOrder", "descending" );
Now the user decides to reload the page and the table with its newly-
characterized column. What happens to sortOrder? It must evaporate,
right?
Well, I might preserve sortOrder by shipping that attribute to the
server when the user enters it. At reload time, that value is known by
my CGI. No problem. The CGI gets busy constructing the page to answer
the reload request, including filling in the sortOrder attribute. So
far so good.
But when the page gets to the browser, I think that sortOrder, a
mystery attribute to the browser, will /again/ disappear, so the
user's earlier work is lost, correct?
I could put sortOrder in the column's title attribute and send that to
the CGI. What a pain, though, to parse that thing coming in to the
client at onload time.
Now, finally, the question: short of using cookies, can you think of a
way to retain an added attribute over a page reload?
Thanks!
-- ben