Add the below css to get the Check box aligned to Text
input[type="radio"] { margin-top: -2px; vertical-align: middle; }
Add the below css to get the Check box aligned to Text
input[type="radio"] { margin-top: -2px; vertical-align: middle; }
How to set a Specific option as selected
<html> <head> <script src="jquery-2.1.0.min.js" type="text/javascript"></script> <script> $('document').ready(function(){ $('#btnSubmit').click(function(){ alert($('#cboLocation').val()); alert($('#cboLocation').find(":selected").text()); }); }); </script> </head> <body> <select name="cboLocation" id="cboLocation"> <option value="">Select Zone</option> <option value="South">South Chennai</option> <option value="North">North Chennai</option> <option value="East">East Chennai</option> <option value="West">West Chennai</option> </select> <input type="button" name="btnSubmit" id="btnSubmit" value="Click Me"/> </body> </html>
How to get Selected Item Value
alert($('#cboLocation').val());
How to get Selected Item Text
alert($('#cboLocation').find(":selected").text());
1.Utility Classes should have constants for variable
public class PolicyUtils { public static final String TOTAL_POLICY_LIMIT = "totalpolicylimit"; requestHelper.setRequestAttribute(TOTAL_POLICY_LIMIT, policyLimit); }
Since multiple Users can access the JSP page at same time assigning variable name to constant and changing it later makes it easy to change the actual variable name in case needed in future.