CharisKomos (Talk | contribs) (Created page with "function importScientific(){ $.ajax({ "url": 'https://static.igem.org/mediawiki/2017/2/25/Back.txt', "type": "GET", "dataType": "text", "timeout": 10000, "da...") |
CharisKomos (Talk | contribs) |
||
Line 14: | Line 14: | ||
//Write code to be executed when the request FAILS. | //Write code to be executed when the request FAILS. | ||
}); | }); | ||
− | + | $('#results').addClass('grayscale'); | |
} | } | ||
Line 32: | Line 32: | ||
//Write code to be executed when the request FAILS. | //Write code to be executed when the request FAILS. | ||
}); | }); | ||
− | + | $('#results').removeClass('grayscale'); | |
} | } |
Revision as of 16:30, 5 October 2017
function importScientific(){
$.ajax({ "url": 'https://static.igem.org/mediawiki/2017/2/25/Back.txt', "type": "GET", "dataType": "text", "timeout": 10000, "data": {}
}).done(function(data, textStatus, jqxhr) {
$('#results').html(data); $('#mode').val('simple'); console.log('This is from console alone' + data);
}).fail(function(jqxhr, textStatus, errorThrown) {
//Write code to be executed when the request FAILS.
}); $('#results').addClass('grayscale'); }
function importGeneral(){
$.ajax({ "url": 'https://static.igem.org/mediawiki/2017/2/24/GreeKom_front.txt', //'https://static.igem.org/mediawiki/2017/2/23/Front.txt', "type": "GET", "dataType": "text", "timeout": 10000, "data": {}
}).done(function(data, textStatus, jqxhr) {
$('#results').html(data); $('#mode').val('scientific'); console.log('This is from console alone' + data);
}).fail(function(jqxhr, textStatus, errorThrown) {
//Write code to be executed when the request FAILS.
}); $('#results').removeClass('grayscale'); }