javascript - Html form not submiting with appendChild -


i want render js file(contains html) main html file , html form cant submitting because of js.

i used code like:

loadheaderfooter();  function loadheaderfooter() {    var js = document.createelement("script");    js.type = "text/javascript";    js.src = "http://bargains-online.com.au/ebay/ebay_2015/new-theme/js/header.js";    document.body.appendchild(js); } 

this above function render js file , append html code main html file because of document.body.appendchild(js);.

my below code not working:

function submitform() {    $('#frmpage').submit(); } 

try this

$(document).ready(function() {    $(document).on('submit', '#frmpage', function (event) {       event.preventdefault();       alert("submit form");    }); }); 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -