开发者

Jquery Load Page in the same domain

开发者 https://www.devze.com 2023-03-31 22:04 出处:网络
I\'ve been trying t开发者_StackOverflowo load an URL using JQuery\'s .load() function. I have an URL -

I've been trying t开发者_StackOverflowo load an URL using JQuery's .load() function.

I have an URL - https://stanfordwho.stanford.edu/SWApp/authSearch.do?search=pra**&stanfordonly=checkbox&affilfilter=everyone&filters=closed

That I'm on and I 'd like to call this - $("#StanfordProfile h2").load("https://stanfordwho.stanford.edu/SWApp/authSearch.do?search=Ajay%20Prakash&stanfordonly=checkbox&affilfilter=everyone&filters=closed")

The selector works when I'm on the second page, but it's not working when I try the above command. I thought this would work because I'm loading from another page on the same website (as in I shouldn't be coming across a problem due to the same-origin policy).

Can anyone help?


Perhaps try with a url excluding the domain

$("#StanfordProfile h2").load("/SWApp/authSearch.do?search=Ajay%20Prakash&stanfordonly=checkbox&affilfilter=everyone&filters=closed");
0

精彩评论

暂无评论...
验证码 换一张
取 消