javascript - How to display items of struts2 iterator independently? -



javascript - How to display items of struts2 iterator independently? -

i using struts iterator tag display result of arraylist on jsp page. problem want item independent item can utilize more processing want each item hyperlink different pages.

<ol> <s:iterator value="ls"> <li> <a href="javascript:document.form1.submit();"> <s:property /> </a> </li> </s:iterator> </ol>

i not able target each li independently. need text of each list item can send in form hidden variable. problem targeting li's independently.

change code to

<ol> <s:iterator value="ls"> <li> <a href="javascript:dosubmit(this)"> <s:property /> </a> </li> </s:iterator> </ol> <s:hidden name="name" id="idhidden"/> <script type="text/javascript"> function dosubmit(val){ $("idhidden").val(val.value); document.form1.submit(); } </script>

javascript jquery html jsp struts2

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -