【问题标题】:How to change simple form post into an AJAX calls如何将简单的表单帖子更改为 AJAX 调用
【发布时间】:2011-07-05 11:48:36
【问题描述】:

我有一个非常简单的网络表单;

<form name="logmeinsupport" action="https://secure.logmeinrescue.com/Customer/Code.aspx" method="post">
<span>Enter your 6-digit PIN code: </span><input type="text" name="Code" /><br />
<input type="submit" value="Connect to technician" />
</form>

在 logmeinrescue 端,会将错误代码发布回 URL:

点赞:http://tomtom-uk--tst2.tomtom.com/app/utils/support_login?LogMeInRescueResponse=PINCODE_INVALID

但是,我们的服务器设置将其解释为 Web 服务器中的一个页面,因此,我收到 404 错误:

404 页面未找到

找不到页面“utils/support_login?LogMeInRescueResponse=PINCODE_INVALID.php”。

我们的基础架构团队要改变它并不容易。我想知道是否可以使用 Ajax 回调 post 函数来获得响应。而且我认为困难在于跨服务器ajax调用。

有什么例子吗?谢谢

干杯, 清

【问题讨论】:

  • utils/support_login?LogMeInRescueResponse=PINCODE_INVALID.php 不太可能被找到,因为您在参数后面有 .php 扩展名。我想你的意思可能是utils/support_login.php?LogMeInRescueResponse=PINCODE_INVALID

标签: ajax forms post webforms


【解决方案1】:

服务器查找文件 'utils/support_login?LogMeInRescueResponse=PINCODE_INVALID.php'。

我认为您应该将您的请求更改为:

utils/support_login.php?LogMeInRescueResponse=PINCODE_INVALID

这样服务器会查找support_login.php,如果你的服务器上确实有这个名字的文件,你就不会再出现这个错误了。

【讨论】:

  • 我不明白。我无法将我的请求更改为 utils/support_login.php?LogMeInRescueResponse=PINCODE_INVALID 。因为我想得到secure.logmeinrescue.com/Customer/Code.aspx的回复
  • 检查您的secure.logmeinrescue.com/Customer/Code.aspx - 在那里您可以请求support_login.php
猜你喜欢
  • 2014-12-22
  • 2012-05-15
  • 2012-06-20
  • 2023-03-26
  • 2012-10-02
  • 2019-06-10
  • 2016-05-03
  • 2012-10-17
  • 2014-05-24
相关资源
最近更新 更多