English 中文(简体)
法官只能对平原做出反应,否则不会工作?
原标题:getJSON only responds to plaintext and will not work otherwise?

我正在利用PgetJSON从一个链接(例如:/login?user=foo&pass=bar)中抽出一名JSON。 当我把这一联系简单地推到浏览器时,我会收到“磁波”的迅速(即:申请/json)。 荷兰女律师协会在这种联系方面开展工作。

然而, 当我在“文件下载”中迅速打开时,把该文本作为简单易懂的文本(txt文档)寄给我的服务器,并打电话让JSON在THAT链接(即/jsondata.txt)上,该文本是完美的。

Keep in mind I don t have the ability to change anything on the back end.

这里有什么想法? 基本上,当我作为便捷文本而不是因违约而返回时,我就能够撤回JSON案。

EDIT Here s my code...pretty straightforward:

  $.getJSON("http://EXTERNALHOSTNAME.com/WEBSERVICE.svc/login?username="+document.frmLogin.email.value+"&password="+document.frmLogin.password.value+"", function(data) {

alert("it worked!");
});

如果我把这一条线替换成与一个滴式箱子(txt)文档的链接,它就会发挥作用:

//$.getJSON("http://dl.dropbox.com/u/NUMBERS/login.txt", function(data) {
最佳回答

你们可以把其他领域(除原产地外)划出 j。 如果EXTERNALHOSTNAME支持jsonp的回复,那么你可以通过下列表格解决你的问题:&questback=。 如果你不能在你服务器上打字,说明这种反应的路线,那么它就从你自己的领域产生。 除此以外,如果你能够从EXTERNALHOSTNAME(我怀疑)上页,你就可以从这个领域获得一席之地,执行这一亚克斯呼吁(因为它没有违反同一来源规则),然后将这些数据偷运到母体。

问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签