I have written one jsp file. In that file, I have one drop down which contains list of request name (like student name) based on the selected value within drop down I will display the link 'Request Details(ie, Student Details)' besides that drop down.
This link is used to navigate to view the request information(ie, Student Information.)
I have written the code as follows :
In My Action Class :
Expand|Select|Wrap|Line Numbers
- if(interviewForm.getRequisitionName()!=null){
- long reqId = Long.parseLong(interviewForm.getRequisitionName());
- request.setAttribute("requisitionId",reqId);
- //System.out.println("Req Id : "+reqId);
- }else{
- //System.out.println("Requisition Name"+interviewForm.getRequisitionName());
- request.setAttribute("requisitionId","3");
- //System.out.println("In Action : "+request.getAttribute("requisitionId"));
- }
javascript:
Expand|Select|Wrap|Line Numbers
- function showlink(){
- alert( 'Value: ' + document.getElementById("requisitionName").value);
- //resetVal();
- disableOrEnableMarks();
- var candidateId = document.getElementById("id").value;
- document.InterviewScheduleForm.action ="InterviewSchedulerAction?id="+candidateId;
- document.InterviewScheduleForm.submit();
- }
Expand|Select|Wrap|Line Numbers
- <tr>
- <td class="Content" width="30%">
- <bean:message key="interviewscheduler.field.interviewRequisitionName" />
- :
- <span class="reddot"> *</span>
- </td>
- <td width="30%">
- <input type="hidden" name="id" value="<%=candidateId%>">
- <logic:present name="requisitionNameList" scope="request">
- <html:select property="requisitionName" styleClass="select1" onchange ='javascript:showlink();'>
- <html:options collection="requisitionNameList" property="id"
- labelProperty="requisitionName"/>
- </html:select>
- </logic:present>
- </td>
- <%
- int requisitionId = Integer.parseInt(request.getAttribute("requisitionId").toString());
- if(requisitionId!=3){%>
- <td><a href="javascript:showrequisitiondetails()"> Show Requisition Details</a></td>
- <td width="20%">
-
- </td>
- <% } %>
- </tr>
Can you plzzzzzzzz help me..........
Thanks in advance