Jquery with IE7 does not support
-
Tuesday, September 13, 2011 6:10 AMAs far as I know Json object is not supported in IE7 (Please correct if I am wrong). I have used Jquery functions in my applicatiion. here jquery is working fine in IE8 and IE9. but it is not working in IE6, IE7 or other lower versions. I need to support these versions as well. Please suggest how would I support these browsers.
Rakesh Kumar
All Replies
-
Wednesday, September 14, 2011 4:08 AMWill you clarify which part of JSON processing fails in IE7? I think jQuery will use eval() to perform processing if native JSON support is not detected.
-
Wednesday, September 14, 2011 4:42 AM
we are using following pattern for our work.
function function1(param1, param2){
jQuery.ajax({
url: Webservice Url with Method Name,
type: 'post',
contentType: 'application/json',
data: JSON.stringify({ Param1: param1, Param2: param2}),
dataType:'json',
success:
function (result) {// do something here
},
error:
function (XMLHttpRequest, textStatus, errorThrown) {
var jsonError = JSON.parse(XMLHttpRequest.responseText);
// do something here}
});
}Here JSON is null and because of that we are getting error for JSON.stringify({ Param1: param1, Param2: param2})
I have tried an simple object in IE7 as well but it was also not working.
Rakesh Kumar -
Wednesday, September 14, 2011 5:39 AM
It's not actually an issue of jQuery then...
If you're using code that expect JSON support, it'd be helpful to include JSON library in your code. It adds these functions for you. (see the ReadMe in lower pane of GitHub reference in the bottom)
- Edited by cheong00 Wednesday, September 14, 2011 5:45 AM
-
Thursday, September 15, 2011 10:12 AM
Hi,
I have gone through the given files and added them in my application. now Json is getting an object value but still behaviour is same. its not working. I am getting error which is thrown here like "throw new SyntaxError('JSON.parse');" in JSON2.js file.
I am not sure what is the issue.
Rakesh Kumar- Edited by Cougar_Rakesh Thursday, September 15, 2011 10:19 AM
-
Friday, September 16, 2011 5:58 AM
What is the string you're passing to this function?
This error indicates the input is not valid JSON string.
-
Tuesday, September 20, 2011 5:49 AMModeratorHi Cougar_Rakesh,
Could you provide more info as cheong00 required for us to go on with your issue?
We are looking forward to hearing from you.
Have a nice day,
Leo Liu [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.


