javascript - Java web application justified steps for form -


hey thank taking time answering question, working java web application in eclipse quit new it, website contain form , takes few steps/pages user complete it, in header part have master page few picture wish show user step on form had page contain form submit logic etc.

page 1: master page, here page contain images , bit of logic hoping show process user displaying different picture.

<div style="text-align: center; padding-top:5px;" > <%if (steps == 1){ %>     <img src="../../images/nivagationarrow1highlight.png"> <%}else{ %>     <img src="../../images/nivagationarrow1.png"> <%} %> <%if (steps == 2){ %>     <img src="../../images/nivagationarrow2highlight.png"> <%}else{ %>     <img src="../../images/nivagationarrow2.png"> <%} %> <%if (steps == 3){ %>     <img src="../../images/nivagationarrow3highlight.png"> <%}else{ %>     <img src="../../images/nivagationarrow3.png"> <%} %> </div> 

page 2 form, display above page header :

**<jsp:include page="/form/page1.jsp" flush="true"/> <form id="form" action="confirmation.jsp" method="get">    <input id="formmain" type="" name="forminput" value=""></input>    <input id="1form" type="" name="forminput" value=""></input>         <input class="submitback" type="button" onclick="history.go(-1);"  />    <input class="submitnext" type="button" onclick="javascript:submitform();" /> </form> 

page 3 have form(check-boxs) , bunch of information etc.

page 4 showing message user had completed form , them.

here question: tried including java code <% int steps=1;%> in page 2 , hope master page pick parameter , logic, nothing happen. how can set parameter in page master page can read ?? here way or better approach ??

thanks again comment,appreciate !!

try:

page 2:

<% int steps=1;%> <jsp:include page="/form/page1.jsp" flush="true">     <jsp:param name="steps" value="<%= steps %>"> </jsp:include> 

page 1:

${param.steps}  || request.getparameter("steps") 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

c# - Retrieve google contact -

javascript - How to insert selected radio button value into table cell -