x10Hosting Forums


If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.





Reply
Old 12-14-2007, 07:50 AM   #1 (permalink)
VIP User
 
Join Date: Nov 2007
Posts: 430
Credits: 4,772
oracle is on a distinguished road
[Browser based Chat ] Help please, quite a challenging problem i guess

Hello All,

I am developing a browser based chat program right now, But I am facing one problem in that and unable to think of a possible solution.

I am simulating it locally still and this is whats happening exactly. I am simulating two users scenario by logging in from two different browser. Suppose two users are A(mozilla) and B(netscape).

Both see the "logged in friends list" on there front panel and as they click the friend name another pop-up opens up (like gtalk) where they can chat. However the problem is, when user A clicks on user B to open a chat window and send a message to him, the pop-up windows doesn't open automatically on user B's side. Hence user B is unable to see that messages which user A is trying to send until he opens the chat window corresponding to user A on his side.

So user A will keep thinking that user B is recieving messages but ain't replying. However user B is unable to have a look at those message because he has not opened the chat window for user A, by clicking on user A in the the front panel.

What I am thinking is of generating another pop-up or a simple alert to start with, so that as soon as user A sends a message to user B, he gets a notification that user A is sending you a message. However I am blank over how can I achieve this. I thought of the below solution,but want some expert's comment before trying out further.

I thought that may be as soon as user A press the enter button to send message to user B, I detect the cookie. And for the user who's cookie is equal to user B's cookie, generate an alert message. However I am unable to understand that will the script running on user A side be able to detect cookie on user B's browser.

Quite a complex scenario i guess, never came across such a problem till now, so I am unable to understand how to proceed.

Also if some one can throw some light over how do Gtalk people generate those pop-up it will be of great help.

Kindly lemme know if you have ever solved such a problem.

Hoping for some help,
Imoracle.
oracle is offline   Reply With Quote
Old 12-14-2007, 09:19 AM   #2 (permalink)
x10 Elder
 
t2t2t's Avatar
 
Join Date: Sep 2006
Location: Europe, Estonia
Posts: 683
Credits: 4,079
t2t2t will become famous soon enough
Send a message via Skype™ to t2t2t
Re: [Browser based Chat ] Help please, quite a challenging problem i guess

gTalk (and the whole gmail) uses ajax requests, to get updates from master server (google server).

This is one way to do it: When A starts chat with B, on next update server tells user A (more exactly the code that is running) that user B has started chatting with him, allowing the code to open window for A.
__________________
This post has been marked spam 52 times.

PHPBB 3

Last edited by t2t2t; 12-14-2007 at 09:19 AM..
t2t2t is offline   Reply With Quote
Old 12-14-2007, 09:21 AM   #3 (permalink)
Lord Of The Keys
 
Slothie's Avatar
 
Join Date: Sep 2007
Location: Singapore
Posts: 1,432
Credits: 18,560
Slothie is a jewel in the rough
Re: [Browser based Chat ] Help please, quite a challenging problem i guess

As above, it utilizes ajax. There are lot of ajax toolkits out there but my personal one is my-bic as it doesn't really tie you to specific method, think of it more like a state of mind
__________________

Easiest 70 points you'll make on x10

Feel free to add my reputation by clicking on the if you found my post helpful to you :P


If I am not responding to your PMs, that means I am ignoring you. Take a hint.



09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

Slothie is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chat Install Problem. Need Help jeffreyroshan Scripts & 3rd Party Apps 2 10-28-2007 01:19 PM


All times are GMT -5. The time now is 09:52 PM. Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.0
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
Copyright 2008+ x10Hosting LLC.
Ad Management by RedTyger




CO.CC:Free Domain

Vote for us!