Closed

Javascript Cross Domain Ajax that works in IE 7+ and ALL Browsers

This project received 2 bids from talented freelancers with an average bid price of $20 USD.

Get free quotes for a project like this
Employer working
Project Budget
$10 - $30 USD
Total Bids
2
Project Description

Hi All,

I need two different types of scripts created. One that will post a request to a server, and the other that will post a request to a server and enter the return into a div. The server will respond with the correct Access-Control-Allow-Origin Header. I have been using jQuery but the $.ajax doesn't work on cross domain for the older IE browsers.

REQUIREMENT 1: ALL CODE NEEDS TO HAVE A TIMEOUT SET SO IF THE SERVER IS DOWN, IT WON'T AFFECT THE USER.
REQUIREMENT 2: EXTREMELY LIGHT-WEIGHT - NO ADDITIONAL PACKAGES ALLOWED
REQUIREMENT 3: DONE IN 24 HOURS
REQUIREMENT 4: Payment will be released once tested.

Here is the first function that needs to be converted to a non-jquery code that works in all browsers.

// TRACKER
function log() {
$.ajax({url:"[url removed, login to view]", dataType:"html", type:"POST", cache:false, timeout:1000, data:{item:"ITEM1", session:"SESSIONKEY"}});
}
setTimeout("log();", 500);

// DISPLAYER
function getTools() {
$.ajax({url:"[url removed, login to view]", dataType:"html", type:"POST", cache:false, timeout:6000, crossDomain:true, async:false, beforeSend:function() {
$("#ccont #selling-tools").html('<div class="boxset" style="width:95%; margin:20px 2%;padding:20px 0.5%; margin-bottom:0;"><img src="[url removed, login to view]" align="center" /></div>').show();
}, error:function() {
$("#ccont #selling-tools").html("");
}, data:{item:"ITEM1", session:"KEY1"}}).done(function(html) {
$("#selling-tools").html(html);
});
}

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online