<strong><span style="font-size:24px;">JS</span></strong>
<p><script>
$(document).ready(function(){
var defaultId = "${defaultSelected}";
var defaultTime = "${timeName}";
$("select option").each(function(){
if($(this).val()==defaultId || $(this).val()==defaultTime){
$(this).attr("selected","selected");
}
});
$("#all").change(function(){
//alert(document.getElementById("allItem").selected);
if(document.getElementById("allItem").selected == true){
$("#timeText").hide();
$("#timeSelect").hide();
}else{
$("#timeText").show();
$("#timeSelect").show();
}
});
});</p><p></script></p><span style="font-size:24px;"><strong>HTML</strong></span>
<form action="${baseUrl}/report/issueStatus.shtml">
<span>Select a project:</span>
<select name="selectedProId" id="all">
<c:forEach items="${projectNameId}" var="pi">
<option value="${pi.value}">${pi.key}</option>
</c:forEach>
<option value="-1" id="allItem">All</option>
</select>
<span id="timeText">Select a time horizon:</span>
<select name="timeHorizon" id="timeSelect">
<option value="Week">Last week</option>
<option value="Month">Last month</option>
</select>
<button type="submit" id="submit">search</button>
</form>