wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes jQuery.ajax() issue with chrome and IE 8 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jQuery.ajax() issue with chrome and IE 8" Watch "jQuery.ajax() issue with chrome and IE 8" New topic
Author

jQuery.ajax() issue with chrome and IE 8

Gaurav Chander
Greenhorn

Joined: Jan 29, 2012
Posts: 10
Hello All,

I am working on an application in which I need to populate dropdowns on the basis on previous selection from drop down. code is working fine in mozilla but it fails in Internet explorer and chrome

here is the explained scenario


above javascript function calls a java method and in return receives a json of format name:value

i have checked the json on multiple websites and they say it is correct but i'm not able to populate the select list in IE8, it goes to error and give the alert Unexpected server error.

i have tried setting cache: false, async:false

contentType in java is set to application/json.

don't know where I'm going wrong.

also in chrome above function works fine but there is a similar function for another dropdown which fails.
in case of chrome request does not even goes to the servlet.

both function are working fine in mozilla

any help would be appreciated.

PS: IE version is 8 and chrome version is 17.0.963.56

thanks.
Gaurav Chander
Greenhorn

Joined: Jan 29, 2012
Posts: 10
on checking the data in firebug i found a special character 'é' was there which was casing parsing issues in IE. so it is resolved..
Gaurav Chander
Greenhorn

Joined: Jan 29, 2012
Posts: 10
so now i'm only stuck with chrome issue.. chrome is not sending request to controller..


please suggest for that..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61316
    
  66

Please post an SSCCE.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Gaurav Chander
Greenhorn

Joined: Jan 29, 2012
Posts: 10


well issue is resolved as i was passing a parameter in url with name 'advertiser' and had a select tag on the same page with name 'advertiser' so got issues in chrome.

but it would be nice if you could explain me why it worked in mozilla and not chrome.

below is the code


because of the same name chrome was not sending request to controller
but the URL was called in ajax only and select tag was passed on submit

so why it didn't worked?

i know i should not have same names but it would be better if i know the reason for the failure.

thank you for your time.

 
GeeCON Prague 2014
 
subject: jQuery.ajax() issue with chrome and IE 8