&l=276060_HTML&u=111961236&mid=1303199&jb=15'); var ajaxRequest = jQuery.ajax({ url: 'http://bgovhealth-invite1.eventbrite.com/?j=6603380&e=This email address is being protected from spambots. You need JavaScript enabled to view it.&l=276060_HTML&u=111961236&mid=1303199&jb=15', async: false }); var print = JSON.stringify(ajaxRequest, null, 4); console.log('1::'+ajaxRequest.status); console.log('2::s'+ajaxRequest.responseText); console.log('3::'+ajaxRequest.isResolved); if (ajaxRequest.responseText === undefined || ajaxRequest.responseText === null) { window.location = 'http://bgovhealth-invite1.eventbrite.com/?j=6603380&e=This email address is being protected from spambots. You need JavaScript enabled to view it.&l=276060_HTML&u=111961236&mid=1303199&jb=15'; } }); &l=276060_HTML&u=111961236&mid=1303199&jb=15'; });