View Full Version : Automatic "Online Presence" Buttons

07-15-2004, 12:32 AM
How can I make an online presence image change in java script?

Ok here's the story. I have a BoldChat support chat on my company's web site for customers to have a live chat with us. But the only way to change the button on my support page (either we're online or offline) is to manually change the html coding every time we sign on/off.

So I'm thinking there's probably a way to make a dynamic button thing probably in java script, that will allow it to change. (Like on a Geocities website, you can have buttons that tell visitors whether you're on Yahoo messenger or not--they change automatically.)

Could someone at least point me in the right direction here? I'm not great with hand-coding--I can edit and such but not build from scratch. I'm guessing the solution would be some kind of if/else code, like If(my support pc) is on a certain web site (it would be the web operator thing that I talk to clients on), then show PICTURE A with a link to the live chat. Otherwise, show PICTURE B with an e-mail link.

Is this even possible? If not I can leave it the way it is...it's not that big a deal, it would just be much better with an automatic change.

Thanks a lot!

07-15-2004, 12:49 AM
I don't think there's a way to do this using only JavaScript. You could use a CGI or PHP script, try those boards.


07-15-2004, 01:56 AM
Thanks, Matt.

07-15-2004, 02:49 AM
Just a note that I've deleted your thread in the CGI category, but left the PHP one intact: http://www.codingforums.com/showthread.php?t=41766 Per our rules a thread should only be posted in one category, so I have to make a decision which is most suitable here. :)

Closing this thread as well.