Using Forms within Iframes and then displaying response within iframe aswell
For some reason, i am having problems with placing a form inside a iframe. It displays fine, with the form input areas working fine, but however when I try and send the details to the file (mail.php) in order to use the info submitted, it doesn't even send the data. It just remains as it was. Oh and i don't want the submit button outside the i frame unless i have to.
Here is the code for the iframe and the page it displays:
<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>开发者_StackOverflow
<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>
And here is the code for the iframe itself:
<iframe src="http://www.texteri.com/developers/iframe" width="250" height="250" allowTransparency="true">
Any ideas on how to get the form to submit and then maybe display the result in the iframe aswell?
Thanks in advance, Niall
By looking at your page it seems you're closing your iframetag inside the iframe itself.
Your iframe
<html>
.
.
.
</table>
</form>
<a href="http://www.texteri.com">Powered by Texteri.com</a>
</iframe>
That last </iframe>
tag should not be there.
It should be like this (at the end)
<iframe src="http://www.texteri.com/developers/iframe" width="250" height="250" allowTransparency="true"></iframe>
精彩评论