Author Topic: Loading the chat panel on page, ajax  (Read 6947 times)

0 Members and 1 Guest are viewing this topic.

IberoMedia

  • Jr. Member
  • **
  • Posts: 2
Loading the chat panel on page, ajax
« on: July 13, 2011, 06:45:20 PM »
Hello,

I was able to load the first page of the chat panel on home page (embeded on designated page). But when I send ajax request, I am unable to load the next phase (whether it be the confirmation page of message sent, or the chat box).

Any pointer would be greatly appreciated.

Ajax request:

Code: [Select]

var style = jQuery("input#style").val();
var info = jQuery("input#info").val();
var referrer = jQuery("input#referrer").val();
var group = jQuery("input#group").val();
var email = jQuery("input#email").val();
var name = jQuery("input#name").val();
var message = jQuery("textarea#message").val();

var datastring = 'style=' + style + '&info' + info + '&referrer' + referrer +
'&group' + group + '&name='+ name + '&email=' + email + '&message=' + message;

jQuery(this).ajax({
type: "POST",
url: "chat/leavemessage.php",
data: dataString,
sucess: function(){
 
alert("YOUR MESSAGE HAS BEEN SENT");
 
}
 
});