Dr John Stockton <sp**@merlyn.demon.co.uk> wrote in message news:<jg**************@merlyn.demon.co.uk>...
JRS: In article <a7**************************@posting.google.com >, seen
in news:comp.lang.javascript, martin <mc*******@earthlink.net> posted at
Sun, 4 Jan 2004 09:54:11 :-I needed a way to display calculated, multiple, changing values
(numerical sums) as users interacted with the page, and do this
without going back to the server to load the page again.
What I finally settled on was <input type=button...> without an
"onClick" attribute (because the purpose of the buttons was only
for displaying values).
It works fine except they look and act like buttons. No big deal,
but is there a better way?
<input type=text name= ... readonly> to show it in a control; or use a
<textarea ...> ... </textarea>; or FAQ 4.15 to show it as ordinary HTML.
Read the FAQ.
Good thought, except "readonly" wouldn't allow for the values to
to be changed on the client-side as the script responds to events.
The need is to display changing values based on user interaction.
I guess I'm stuck with type=button.
But, this blows me away: I couldn't even get <input type=text
readonly...> to work anyway, and grasping at a last straw I tried
<input type=readonly ...> and guess what, it worked. Browsers
ignore HTML that they don't know about, but there they were,
little readonly text areas. The docs say nothing about this that
I can find. I can't change their values though, so I'm still
stuck with do-nothing buttons to display values.