473,760 Members | 9,717 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4366
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.cogwr ote:
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.cogwr ote:
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
2236
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: http://www.gzentools.com/snippetview.php?c=Concepts&v=sendim.php
2
10937
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 both of those into each IM client, but perhaps there is a better way. Thank you.
1
2383
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 prompt the other user if they wish to chat or not.. if they do.. initiate 1-on-1 chat. I've seen it done on faceparty.com which I believe uses DigiChat (java). Unfortunately it's too expensive to purchase so I wish to develop a simplistic version...
10
10751
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? I used to use Visual Basic a long time ago but want to create the fastest, easiest for the end user to install, most reliable software program possible
0
1391
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 don't believe this is possible. IM is a client app that accesses a private server on its own port (i.e not accessible through normal web)
6
2000
by: lalejo83 | last post by:
How do I go about starting an instant messenger in C++. pLEASE HELP ME
3
1817
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
1949
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 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...
1
1975
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
9521
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9333
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10107
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9945
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9900
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7324
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5361
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3442
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.