Monday 24 September 2018

Post Data to iFrame With HTML Only

To send data into iFrame you don't need JavaScript or anything. You just have the form's target attribute match the iframe's name attribute. The outer page doesn't even reload. Copy this code and test it.

<form action="iframe.php" target="my_iframe" method="post">
   <label for="text">Name:</label>
   <input type="text" name="full_name">
   <label for="text">Email:</label>
   <input type="text" name="email">
   <input type="submit" value="post">
</form>
<iframe name="my_iframe" src="iframe.php"></iframe>

Powered by www.codexpresslab.blogspot.com
Previous Post
Next Post

post written by:

0 Comments:

Hit me with a comment!