snowboardr
Programmer
Below is a simple jquery function, calling a json php file I have run through every possible thing i can think of but its not running on IE (compatibility mode ) and Opera 10...
Google Chrome, IE 8, Firefox, Safari all run this script without an issue.
I have checked my json file and it is returning valid json
i added headers to the php / json file
its as though opera and ie compatibility are not seeing the $.ajax function, however it is going inside the function i tested for that!
Jason
[red]Army[/red] : [white]Combat Engineer[/white] : [blue]21B[/blue]
Google Chrome, IE 8, Firefox, Safari all run this script without an issue.
I have checked my json file and it is returning valid json
Code:
{"t1":"For Sale","t2":"Free","u1":"1%2Ffor-sale%2F","u2":"1.624%2Ffor-sale%2Ffree%2F"}
i added headers to the php / json file
Code:
header('Cache-Control: no-cache, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Content-type: application/json');
its as though opera and ie compatibility are not seeing the $.ajax function, however it is going inside the function i tested for that!
Code:
//#read online that cache was an issue for IE
$.ajaxSetup({cache:false});
jQuery.fn.loadBread = function(){
var ar = arguments[0] || {}; // It's your object of arguments
var page = ar.page;
var qs = ar.qs;
var iid1 = ar.idone;
var iid2 = ar.idtwo;
var url = page+"?"+qs;
var sData = $.ajax({
url: url,
dataType: 'json',
data: sData,
success: function(sData) {
//#using plugin for json eval
var e = $.toJSON(sData);
var t1 = $.evalJSON(e).t1;
var t2 = $.evalJSON(e).t2;
var u1 = $.evalJSON(e).u1;
var u2 = $.evalJSON(e).u2;
alert(u2);
}});
};
Jason
[red]Army[/red] : [white]Combat Engineer[/white] : [blue]21B[/blue]