Hi, I have created a messaging system which allows users to send messages to eachother. This works fine but when they reply I dont want them being taken to another page, I want a alert to say "sent" or "not sent". Below is my code which doesnt work.
in php:
echo"<form id=\"form\" name=\"form\" method=\"post\" onsubmit=\"send(reply)\">";
javascript:
function send(reply)
{
var httpRequest;
make_request()
function stateck()
{
if(httpxml.readyState==4)
{
alert (httpxml.responseText);
}
httpxml.onreadystatechange=stateck;
reply_url="compose.php?reply=" + reply.value + "&msgid="<?php echo $msgid; ?> + "&to="<?php echo $to; ?> + "&subject="<?php echo $subject; ?>";
httpxml.open("GET",reply_url,true);
httpxml.send(null);
}
}
I am using php php variables as this data needs to be accessed from the database.
Thanks