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
Post a Comment