+ Reply to Thread
Results 1 to 3 of 3

Thread: [Browser based Chat ] Help please, quite a challenging problem i guess

  1. #1
    oracle is offline x10 Lieutenant oracle is an unknown quantity at this point
    Join Date
    Nov 2007
    Posts
    430

    [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.

  2. #2
    t2t2t's Avatar
    t2t2t is offline x10 Elder t2t2t is an unknown quantity at this point
    Join Date
    Sep 2006
    Location
    Europe, Estonia
    Posts
    690

    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.
    Last edited by t2t2t; 12-14-2007 at 09:19 AM.
    This post has been marked spam 52 times.


  3. #3
    Slothie's Avatar
    Slothie is offline Lord Of The Keys Slothie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Singapore
    Posts
    1,432

    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


+ Reply to Thread

Similar Threads

  1. Chat Install Problem. Need Help
    By jeffreyroshan in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 10-28-2007, 01:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers