English 中文(简体)
在Iframes中使用Forms,然后在iframe中显示响应
原标题:Using Forms within Iframes and then displaying response within iframe aswell

出于某种原因,我在iframe中放置表单时遇到了问题。它显示得很好,表单输入区域工作正常,但当我尝试将详细信息发送到文件(mail.php)以使用提交的信息时,它甚至不会发送数据。它只是保持原样。哦,除非迫不得已,否则我不希望提交按钮出现在i框之外。

以下是iframe的代码及其显示的页面:

<form id="sms" name="sms" method="post" action="http://www.texteri/developers/iframe/mail.php">
<table width="200">
 <tr>
<td align="right" valign="top">From:</td>
<td align="left"><input name="from" type="text" id="from" size="10" /></td>
 </tr>
  <tr>
<td align="right" valign="top">To:</td>
<td align="left"><input name="to" type="text" id="to" size="10a" /></td>
 </tr>
  <tr>
<td align="right" valign="top">Message:</td>
<td align="left"><textarea name="message" cols="15" rows="2" id="message"></textarea></td>
 </tr>
<br>
 <tr>
<td colspan="2" align="right"><input type="submit" name="Submit" value="Send" /></td>
   </tr>
</table>
</form>

下面是iframe本身的代码:

   <iframe src="http://www.texteri.com/developers/iframe" width="250" height="250"   allowTransparency="true">

关于如何提交表单,然后在iframe中显示结果,有什么想法吗?

Thanks in advance, Niall

问题回答

通过查看您的页面,您似乎正在关闭iframe内部的iframe标记。

你的iframe

<html>
.
.
.
</table>
</form>
<a href="http://www.texteri.com">Powered by Texteri.com</a>
</iframe>

最后一个<code></iframe>标记不应存在。

应该是这样的(最后)

<;iframe src=“http://www.texteri.com/developers/iframe“width=”250“height=”250“allowTransparency=”true“>;<;/iflame>;





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签