Hello,
 
It appears I'm coming across a weird bug in jQuery that only occurs with IE
(6).

<script>
        $(document).ready(function(){
                $.get("jq2.html",
                        { name: "John", time: "2pm" },
                        function(data){
                                alert("Data Loaded: " + data);
                        }
                );
        });
</script>
 
The jq2.html (I use Roxen) returns the form paramater "name" that is passed
to it.

In Firefox (jquery uses GET method), it returns the expected "Data Loaded:
Name=John"
In IE, (jquery uses POST method) it returns "Data Loaded: Name=John&#0;John"

Using Wireshark, it appears that jquery sends a POST request like this:

----------------------------------
POST /jq2.html?name=John&time=2pm HTTP/1.1
Accept: */*
Accept-Language: en-us
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MCI
Windows Corporate Image; .NET CLR 1.1.4322; InfoPath.1)
Host: xxx:8000
Content-Length: 18
Connection: Keep-Alive
Cache-Control: no-cache

name=John&time=2p
------------------------------------

So it's sending the variable in the URL like a GET and in the query like a
POST, thus the web server gets 2 copies of each variable.

Any ways around this?

Thanks!

Graeme



_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to