473,385 Members | 1,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Client-side update of changing values to be displayed.

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?

-Martin
Jul 20 '05 #1
5 1646
mc*******@earthlink.net (martin) writes:
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.
So you used client side scripting.
What I finally settled on was <input type=button...> without an
"onClick" attribute (because the purpose of the buttons was only
for displaying values).
A button *without* an "onclick" attribute (or at least an onclick
property set by a script) won't do anything. Are you sure you don't
mean *with* an onclick attribute?
It works fine except they look and act like buttons. No big deal,
but is there a better way?


You want something that the user can press to achieve an effect.
I can't see what would be more appropriate than a button.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
Lasse Reichstein Nielsen <lr*@hotpop.com> wrote in message news:<k7**********@hotpop.com>...
mc*******@earthlink.net (martin) writes:
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.


So you used client side scripting.
What I finally settled on was <input type=button...> without an
"onClick" attribute (because the purpose of the buttons was only
for displaying values).


A button *without* an "onclick" attribute (or at least an onclick
property set by a script) won't do anything. Are you sure you don't
mean *with* an onclick attribute?
It works fine except they look and act like buttons. No big deal,
but is there a better way?


You want something that the user can press to achieve an effect.
I can't see what would be more appropriate than a button.

/L


The need was for someplace/someway to display javascript calculated
values without going back to the server. Like I said, the purpose
of the buttons is only for displaying a value. The displayed values
change, based on the user doing stuff in multiple places elsewhere.
It works fine, but looks a little weird. I suppose a Java applet is
indicated.

-Martin
Jul 20 '05 #3
martin wrote:
Lasse Reichstein Nielsen <lr*@hotpop.com> wrote in message news:<k7**********@hotpop.com>...
mc*******@earthlink.net (martin) writes:

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.


So you used client side scripting.

What I finally settled on was <input type=button...> without an
"onClick" attribute (because the purpose of the buttons was only
for displaying values).


A button *without* an "onclick" attribute (or at least an onclick
property set by a script) won't do anything. Are you sure you don't
mean *with* an onclick attribute?

It works fine except they look and act like buttons. No big deal,
but is there a better way?


You want something that the user can press to achieve an effect.
I can't see what would be more appropriate than a button.

/L

The need was for someplace/someway to display javascript calculated
values without going back to the server. Like I said, the purpose
of the buttons is only for displaying a value. The displayed values
change, based on the user doing stuff in multiple places elsewhere.
It works fine, but looks a little weird. I suppose a Java applet is
indicated.

-Martin


<INPUT type='text'> ???

Or did I eat a little too much stuffing?

--
Alex
Jul 20 '05 #4
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.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 20 '05 #5
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.
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Raquel | last post by:
How do I know whether the 'runtime client' and the 'application development client' are installed on my machine? When I issue the command "db2licm -l", it gives the following output: Product...
2
by: J Huntley Palmer | last post by:
I am having a horrific time integrating uw-imap's c-client for imap support in php. The problem is a whole bunch of "Text relocation remains referenced against symbol" errors during linking....
0
by: khu84 | last post by:
Here is client server very simple code, seems to work with telnet but with with web client code gives blank output. Following is the server code:- <?php function...
2
by: nsaffary | last post by:
hi I hava a client/server program that run correctly when i run it in one computer(local) but when I run client on a one computer and run server run on another, connection does not stablish.(I set...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.