How can i assign my JavaScript 'x' value to html:hidden property. Below my JSP file code.
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html"%>
<script language="JavaScript" type="text/JavaScript">
var x=10;
document.getElementById("bookid").value=x;
</script>
<html:hidden property="book" id="bookid"/>
I tried using "document.getElementById("booking_channel_id").value=x;" But it is not working.
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment