tags:

views:

731

answers:

2

I have a chat application in jquery,i want to invite people on group chat,for that i need to send an auto pop up message which will ask user to accept or reject group chat invitation.i want to use div pop up. where do i start?

+2  A: 

You might want to look at JQueryUI dialog

Gab Royer
Specifically http://jqueryui.com/demos/dialog/#modal-confirmation
Jonathan Sampson
+1  A: 

Use AJAX on each client to poll the server for new invitations. If there is one, retrieve any useful data from the invitation. I would look into using jQuery UI dialog for the popup, since you are already using jQuery. If they click the accept button, it will call your handler, which you specify when you create the dialog.

EDIT for comments:

To make the jQuery UI dialog modal, do this after opening it:

$('.selector').dialog('option', 'modal', true);

or this when you initialize it:

$('.selector').dialog({ modal: true });

More EDIT for comments:

To edit the contents, you simply make your divs like you always would:

<div id='someIdOfYourChoosing' title='the dialog title goes here'>
  //put any elements you want in here
</div>

Then to make the dialog:

$('#someIdOfYourChoosing').dialog({
    modal: true;
});
geowa4
Thanks george,i saw the site and found it to be very useful,basically i want to implement like model confirmation demo shown there,but the problem is i dont no how to use that.From where i will get the script and how to make a demo.Thanks for your prompt reply,waiting again!!!!!
you get it from that page; click the download link at the top. you can even customize the look and feel if you want. i'll edit to include how to make it modal.
geowa4
Ok me downloading ,i just want a similar popup just the content changed inside.Wat to edit can u explain please.
edited for that comment
geowa4