I know this question has been asked before, but none of the answers have been working for me! I am doing a school project and I would like to get the HTML (to parse it for my project) returned by the dynamic schedule files on my schools server.
The page I would like the HTML of is: https://telaris.wlu.ca/ssb_prod/bwckschd.p_disp_dyn_sched
I think that CORS is not enabled for the school server files and I do not know if it supports JSONP...
How do I set up the cross-domain request to get the HTML from this page?
I have tried:
$.ajax({
type:'POST',
url: 'https://telaris.wlu.ca/ssb_prod/bwckschd.p_disp_dyn_sched',
headers: {
'Access-Control-Allow-Origin': '*'
},
contentType: 'text/html',
crossDomain:true
}).done(function( data ) {
});
and I get the error:
XMLHttpRequest cannot load https://telaris.wlu.ca/ssb_prod/bwckschd.p_disp_dyn_sched. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 501.
When I add:
dataType:'jsonp'
I get the error:
GET https://telaris.wlu.ca/ssb_prod/bwckschd.p_disp_dyn_sched?callback=jQuery21108736664191819727_1416964243449&_=1416964243450 400 (Bad Request) jquery.min.js:4send jquery.min.js:4n.extend.ajax jquery.min.js:4(anonymous function)
Any help is greatly appreciated!