jquery.post internet explorer hata (error)

I want to make an ajax request to the URL which I am currently in. For that reason, I did not write the URL again and assign there “”.

But in internet explorer 9, if you make that empty like me, IE9 gives an error in jquery.js in line blabla.. (at the beginnig of the code, x=open(….. )

//the wrong one
jQuery.post("",{"AjaxRequest":1 ,"defaultParams":defaultParams,"searchParams":searchParams},function(responseText,status,response){
    //success doSomething

So rewrite your wrong code like this,

//the right one
jQuery.post("http://write.down.your.url.here?with=params",{"AjaxRequest":1 ,"defaultParams":defaultParams,"searchParams":searchParams},function(responseText,status,response){
    //success doSomething

That resolved my problem.
Some other errors can raise, but here it is not the post to write solutiouns to the other failures.

Bir Cevap Yazın