473,396 Members | 1,756 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,396 software developers and data experts.

trying to write php/ajax instant messenger.

Here's my issue: I have an instant messenger type feature for my site, its
basically an ajax IM feature. I run with a mysql backend on the site, i have
a div on my main page that runs a javascript timer to load the php page via
ajax every 15 seconds which checks the "pinguser" table to see if the user
has any chat requests, then echoes them to a div on the page. what i REALLY
want to do is have the ajax page see if there is a ping for the user, and if
so, pop up a javascript alert or somethign to let the user know he has a
chat request. I tried just echo'ing the javascript to do an alert(); , or
even a window.open. It works if i just run the script by itself, but when it
runs in the div on my main page, i get the rest of the feedback (it displays
the message i echo'ed that said "youve got mail", but the alert box doesnt
pop up. Anyone have any idea what Im doing wrong? I've been googling for 3
days straight and going crazy, never thought to check the groups before.
Oct 22 '07 #1
2 4348
I don't have a direct solution for your problem, but I have a
suggestion. Complex AJAX interfaces are easier to create with one of
the various JavaScript frameworks. One of these is Dojo:

http://dojotoolkit.org/

AOL's AIM Express is built on Dojo (or at least it makes use of it -
look at the source).

-Michael Placentra II
On Oct 22, 2:06 am, "John Doe" <d...@dad.cogwrote:
Here's my issue: I have an instant messenger type feature for my site, its
basically an ajax IM feature. I run with a mysql backend on the site, i have
a div on my main page that runs a javascript timer to load the php page via
ajax every 15 seconds which checks the "pinguser" table to see if the user
has any chat requests, then echoes them to a div on the page. what i REALLY
want to do is have the ajax page see if there is a ping for the user, and if
so, pop up a javascript alert or somethign to let the user know he has a
chat request. I tried just echo'ing the javascript to do an alert(); , or
even a window.open. It works if i just run the script by itself, but when it
runs in the div on my main page, i get the rest of the feedback (it displays
the message i echo'ed that said "youve got mail", but the alert box doesnt
pop up. Anyone have any idea what Im doing wrong? I've been googling for 3
days straight and going crazy, never thought to check the groups before.
Oct 23 '07 #2
On 22 Oct, 07:06, "John Doe" <d...@dad.cogwrote:
Here's my issue: I have an instant messenger type feature for my site, its
basically an ajax IM feature. I run with a mysql backend on the site, i have
a div on my main page that runs a javascript timer to load the php page via
ajax every 15 seconds which checks the "pinguser" table to see if the user
has any chat requests, then echoes them to a div on the page. what i REALLY
want to do is have the ajax page see if there is a ping for the user, and if
so, pop up a javascript alert or somethign to let the user know he has a
chat request. I tried just echo'ing the javascript to do an alert(); , or
even a window.open. It works if i just run the script by itself, but when it
runs in the div on my main page, i get the rest of the feedback (it displays
the message i echo'ed that said "youve got mail", but the alert box doesnt
pop up. Anyone have any idea what Im doing wrong? I've been googling for 3
days straight and going crazy, never thought to check the groups before.
See Steve's answer to your other post!

Oct 23 '07 #3

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

Similar topics

0
by: CountScubula | last post by:
Hello everyone. Ok, a lot of people here have emailed me about instant messenger, so I took some code out of a project I buit, and posted the code. You can find it here:...
2
by: Evan McPeters | last post by:
Does anyone have an example of a simple Instant Messenger program written in Python? I have some code for a simple server and simple client communicating over TCP/IP, so I could always combine...
1
by: Peter | last post by:
Hi all, I have a website where users login to and I wish to add Instant Messenger between 2 users.. for instance, clicking "IM" on someone's profile (assuming they're online of course) will...
10
by: Dee | last post by:
Is C++ the best language to create a Windows based Instant Messenger? Something along the lines of MSN Messenger, ICQ, Yahoo Chat, etc? Are there any downloadable full or trial SDK's out there?...
0
by: Colin Tiernan | last post by:
Hi, Can someone please put me right here. I've been asked to send messages to instant messenger through my asp.net 1.1 website, as a feature of a message board that I had to hand code. I...
6
by: lalejo83 | last post by:
How do I go about starting an instant messenger in C++. pLEASE HELP ME
3
Ranjan kumar Barik
by: Ranjan kumar Barik | last post by:
Hi ! How can I open an instant MSN messenger by creating a link in html. Thanks !
6
by: John Doe | last post by:
Here's my issue: I have an instant messenger type feature for my site, its basically an ajax IM feature. I run with a mysql backend on the site, i have a div on my main page that runs a javascript...
1
by: Tarren | last post by:
Hi: Are there any good c# libraries for integrating aol instant messenger capabilities into my c# code? Thanks, Tayo
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: 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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.