Jump to content

jquery not showing correct results


narjis

Recommended Posts

I'm trying to send input data to some php file but it is not showing correct results.

here is my jquery script.

$(document).ready(function(){
$('#existing_txt').load('ajaxLoad.php');
$("#frm").submit(function(){
	$.post('ajaxChat.php',$('#frm').serialize(),
	function(data) {
	alert(data);
//$('#existing_txt').html(data);
					});
});
});

jaxLoad.php is workig fine but data is not being posted to ajaxChat.php wher i'm gim(#frm).submit();

 

Here is my html

<div id="existing_txt"> </div>
<form id="frm">

Enter the text to be saved as chat<input type="text" name="chatText" /><br />
<input type="submit" value="Save Text" />
</form>

Link to comment
https://forums.phpfreaks.com/topic/266202-jquery-not-showing-correct-results/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.