Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.