EDIT: now the question becomes, how do I tell Sajax to use POST instead of GET? I've tried some examples from google but they are sketchy, and as I said, they didn't work. I know, we're all jQuery nuts around here.
I've used the following code to try and find a limit to the amount of data that can be sent to the server via an ajax call. We use Sajax, obviously. In IE, after somewhere around 1900 characters, the data doesn't get through and we get an error. In Firefox, the limit is somewhere around 6100, but seems to vary a bit on each call. Is this browser-dependent?
Also tried to use POST instead of the default get and telling Sajax to use POST didn't work at all.
Is there a limit to the data stream size sent in AJAX defined anywhere? How about from experience?
<?
require('sites/includes/Sajax.inc.php');
function str_length_test($str){
return strlen($str);
}
sajax_init();
sajax_export('str_length_test');
sajax_handle_client_request();
?>
<html>
<head>
<title>Multiplier</title>
<script>
<? sajax_show_javascript(); ?>
function do_str_length_test_cb(pwd) {
document.getElementById('str_length').value = pwd;
}
function do_str_length_test() {
sample_field = document.getElementById('sample').value;
x_str_length_test(sample_field, do_str_length_test_cb);
}
</script>
</head>
<body>
<textarea id="sample" name="sample" rows=20 cols=60 onblur="do_str_length_test(); return false;"></textarea>
Size: <input type="text" id="str_length" name="str_length" value="" size=10>
</body>
</html>