pre-written message chat code

Posted on 2010-01-11
Medium Priority
Last Modified: 2012-05-08
I am trying to find code that will allow users who come to my website to click one of three buttons which will display a pre-written message assigned with that button AND their name (entered into a text box) in a live chat box.

So basically a user goes to the site and puts in their first name "John" then clicks buttons 1, 2, or 3 and the pre-written message associated with that button shows up instantly in a central chat window to anyone else viewing the page at the same time.

Does anyone know a short code that will do this? Or any pre-written code out there to make this happen? Thank you.
Question by:Redcurb
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

Ludwig Diehl earned 2000 total points
ID: 26298375
Let me know if I understand. You want someone to login to a chat service u provide, then on everyone else's center screen should appear a message or whatever showing he's just logged in?. If that's the case, then u can achieve this using a database (user and loggin table) or a text file where everyone that is logged in will append data onto it. Logged users then will access such file at regular intervals to check if a user has just logged in ( flag or something...). U can do that with ajax.
Please tell me if that's what u are looking 4.

Featured Post

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question