Im wanting to make a web page that when the user clicks on a button a
box above the button changes color. But I want any one that is viewing
that same page to see that change. Any one can change the color of the
box and other people viewing the same page will see it happen. If Joe
in California clicks the button and changes the color then Ron in
Oklahoma will see the box change color on his screen also. So any one
viewing the page has control over the color of the box at any one
time. Like when you leave a message in someones guestbook and it shows
up on the page after you submit it. but I want to do this with colors
or graphics Id like to do this without refreshing the page but I dont
think that is possible. If the page has to be refreshed that is
acceptable. Anyway Im looking for the simplest way to do this in HTML. |
Request for Question Clarification by
djbaker-ga
on
16 May 2006 09:23 PDT
Greetings!
To my knowledge, what you want to do is basic html would not be
possible. I could do it very easily for you if you have access to a
database of some sort and your hosting allows for simple PHP server
side scripting.
WIth those options it would be very easy to do. If you would be
interested in this solution as your answer, let me know and I will
code it for you.
|
Request for Question Clarification by
djbaker-ga
on
16 May 2006 09:48 PDT
FYI...
Unless you are using some sort of free hosting (i.e a comcast account,
some school accounts, a geocities account, etc) you should have access
to a database and some server side scripting. If you do not have
database access or do not know how to set one up it may also still be
possible provided you have some type of server side scripting
available.
In the meantime, I will look up another option I have in mind which
might also do the trick for you if those two options are not
available.
|
Request for Question Clarification by
webadept-ga
on
16 May 2006 11:36 PDT
Hi Honorbound,
While djbaker is waiting for your reply, and looking for other options
for you, I thought I would give you both a few hints. There is no way
to do this with HTML, as djbaker is certainly aware. You are going to
need some programming done with either ASP, PHP, or something of that
nature. The real tool for this job would be Flash, since it can show
real time changes in a database to multiple users, producing the
effect you are looking for without refreshing the page. The most
stable combination is going to be Flash, PHP, and MySQL. There are
other answers of course (there is always more than one way to do
something), but if you are looking for a system that is stable, fast,
and able to handle a growing amount of use, then you are looking at
that combination for this project.
Good luck to you,
webadept-ga
|
Request for Question Clarification by
djbaker-ga
on
16 May 2006 11:57 PDT
Flash would certainly be one option but probably more cumbersome then
what I had in mind. Using Ajax it should be relatively easy to do
what you are asking (provided you have access to a database or your
files have write access permissions on the server) without refreshing
the page. There is a javascript command used by almost all web 2.0
apps called XMLHTTPREQUEST which allows the page to send a request to
a server side script and get processed in the background. The script
then sends back the information to the javascript which can make the
changes on the page without a refresh.
You can see examples of this type of thing in GMail, Digg, Google Maps
and other similar sites. For example, in Gmail when you hit reply to
a message, the reply simply drops down without a page reload being
necessary.
While I have never used this to change the background of a page, it
should be fairly easily. All that would be necessary is to set up a
javascript trigger which checks the server for a new page color every
1 - 3 seconds and then makes the change accordingly.
Best,
djbaker-ga
|