anu123 Posted November 14, 2007 Share Posted November 14, 2007 Can we create hidden field from within a javascrpt function? Link to comment https://forums.phpfreaks.com/topic/77268-creating-a-hidden-field-from-within-a-javascript-function/ Share on other sites More sharing options...
rajivgonsalves Posted November 14, 2007 Share Posted November 14, 2007 try this var input = document.createElement("input"); input.setAttribute("type", "hidden"); input.setAttribute("name", "hiddenfield"); input.setAttribute("value", "somevalue"); document.getElementById("formid").appendChild(input); Link to comment https://forums.phpfreaks.com/topic/77268-creating-a-hidden-field-from-within-a-javascript-function/#findComment-391178 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.