$.ajax & post data - can not solve for a few days...
I have really simply code:
- <script type="text/javascript">
- function check(v)
- {
- if(v!='')
- {
- $.ajax({
- type: "POST",
- url: "test.php",
- data: { test : "123" },
- dataType: "text",
- error: function(textStatus, errorThrown)
- {
- alert(textStatus+", "+errorThrown);
- },
- success: function(data)
- {
- alert(data);
- }
- })
- }
- }
- </script>
and PHP:
- <?php
- echo $_POST['test'];
- exit;
-
- ?>
Everything
works fine on IE (8 & 6), Firefox Chrome, on
my local computer (Windows, Apache 2.2.9, PHP 5.2.6).
But
on the remote server (Linux, Apache 2.2.3, PHP 5.1.6)
doesn't work on IE (both 8 and 6). Error hander (which you can see in the code) returns:
parseerror, [object Error].
On Firefox & Chrome it's working OK... :/
I can't manage with that for a few days. Thanks for any help!