【问题标题】:Submitting to a remote .cfm file using an html form使用 html 表单提交到远程 .cfm 文件
【发布时间】:2011-10-18 23:29:32
【问题描述】:

我希望我网站的访问者能够搜索一家名为 Priority Pass 的公司提供的机场休息室。我创建了以下表单:

<form action="http://prioritypass.com/lounges/lounge-print.cfm" method="post">
  <input type="text" id="print_airport_code" name="print_airport_code" value="MAN" />
  <input type="submit" value="Submit" />
</form>

这反映了他们在自己的移动搜索网站 (here) 上的形式。但是当我提交表单时,参数似乎没有正确发布。

任何帮助都会很棒。谢谢。

他们网站上的表格似乎没有包含我遗漏的任何字段?

【问题讨论】:

标签: html forms coldfusion


【解决方案1】:

您指向了错误的网址;发布到 /lounges/lounge-print.cfm 会产生一个 HTTP 重定向标头,这会破坏您的输出。

另外,您输入字段的名称不正确。使用其他人的表单结果通常需要您保持所有字段名称在远程站点上出现时的一致性。

将表格更改为:

<form action="http://www.prioritypass.com/mobile/lounges.cfm" method="post">      
    <input id="Airport_Code" name="Airport_Code" type="text" size="10" value="MAN" />
    <input type="submit" value="Submit" />
</form>

【讨论】:

  • 非常感谢。我让我的线路在两个单独的实现之间交叉,一个用于移动站点,一个用于休息室打印站点。抱歉问了一个愚蠢的问题:)
猜你喜欢
  • 1970-01-01
  • 2011-12-12
  • 2012-02-28
  • 2016-01-09
  • 2011-12-19
  • 1970-01-01
  • 2011-03-08
  • 2014-08-24
  • 1970-01-01
相关资源
最近更新 更多