PHP HTML Dynamic Form From with Ajax
From w3cyberlearnings
Contents |
PHP Dynamic Form uses Ajax
Use Ajax to load form to main page.
Example 1
page.html: HTML main page
<html> <head> <title>Form</title> <script type="text/javascript" src="jquery.min.js"> </script> <script type="text/javascript"> $(document).ready(function() { $('div#myform').load('form1.html'); }); </script> </head> <body> <div id="myform"></div> </body> </html>
form1.html: HTML form to be loaded to the main page
This is the HTML form that use by the Ajax to load to the main page.
<form method="post"> <table border="0"> <tr> <td> Login Name: </td> <td> <input type="text" name="login_name"/> </td> </tr> <tr> <td> Password: </td> <td> <input type="password" name="login_password"/> </td> </tr> <tr> <td colspan="2"><input type="submit"/></td> </tr> </table> </form>
Output
Related Links
Dynamic HTML From Array
Dynamic HTML From Database
Dynamic HTML with Ajax
- Dynamic Drop Down List with Ajax
- Dynamic List with Ajax
- Dynamic Radio with Ajax
- Dynamic Checkbox with Ajax
- Dynamic Form with Ajax
Others Related