// Draw form while rendering

var form = document.getElementById("myForm");
var html = "";
var registrationURL = "php/registration.php";

html += "<form action='" +registrationURL+ "' method='post' id='registration'>";
html += "<table>";
html += "      <tr>";
html += "        <td>Email Addres</td>";
html += "        <td><input type='text' name='email'></td>";
html += "      </tr>";
html += "    </table>";
html += "    <input id='submitButton' name='Submit' type='submit' value='Register'>";
html += "  </form>";

form.innerHTML = html;