Hello, I tried sending some data like so:
<form action="http://www.someurl.com/something.php" id="login">
<input type="textbox" id="UserName" value="user">
<input type="textbox" id="Password" value="password">
<input type="submit" value="submit">
</form>
<div id="result"></div>
<script type="text/javascript">
$('form#login').submit(function() {
$.post($('form#login').attr('action'), $('form#login').serialize(), function(data) {
$('#result').html(data+'222')
});
return false;
});
</script>
Now, the value of #result div change to 222... that is: the post was successful but for some reason there is no data, and when I go directly to something.php and post manually, it does bring back data (am I mistaken or does the post(success(data)) variable returns the whole page returned after you post something? if so, how could it be?)
Thank you very much for your help