javascript - Add content from form to an existing web page -
i'm trying learn how create blog , have stumbled upon problem of being able add new content existing web page.
the idea create 2 web pages.
page one; home page (empty)
page two; web form when submitting, dynamically add content of filled out form onto page 1 (home page).
so far, javascript i've learned how create new element on click of button add div onto current page want find way add content page (somehow).
code used add element on button click
var number = 1; document.getelementbyid("add_more").addeventlistener("click", function() { var newdiv = document.createelement('div'); newdiv.id = 'ep_holder'; newdiv.innerhtml = 'hello world'; document.getelementbyid('contain_form_upload').appendchild(newdiv); });
i've tried numerous times search content on web me stumble across seams wordpress related has left me no option ask question on here!
i appreciate if take time me!
thanks in advance, sam.
to show submitted data second page on home page should:
1) submit data using usual html form or via javascript.
2) process request using backend language (for instance php).
3) save database (mysql).
4) on home page, connect db when rendering page , select inserted entry. think can find further info each action on stackoverflow.
Comments
Post a Comment