javascript - Jsp : Checkbox and Hiperlink dependency -


i using jsp , struts2.

if user selects checkbox without clicking on hyperlink, user should error msg above checkbox line.

i think on click of hyperlink should call 1 function sets global var true. onclick of checkbox, should call function checks var val , if false error should display.

in case of checkbox uncheck error should not visible. terms , want user should click on hyperlink see terms.

please help.

<tr> <td colspan="2" style="padding-left: 3%;"> <s:text name="text1" /> <a href='<s:property value='#session.url'/>' class="l1" target="_blank"><s:text name="text2" /></a> <s:text name="text3" /> </td> 

<tr> <td colspan="2" style="padding-left: 3%;"><s:checkbox name="ist" id="ist" label="ist" value="%{ist}" tabindex="12" />&nbsp;&nbsp; <s:text name="ister" /> </td> 

why dont enable checkbox on click of hyperlink. till time disabled checkbox.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -