0

hello i have some problem in showing button, when data exist and data not exist. i want the button show if data exist also data not exist. my current problem right now the button only show when data exist but the button automatically hide when data not exist.

here what i got so far..TQ

<tbody>                              
      <jsp:useBean id="reportList" scope="request" type="List" />
        <%                                                                                           
          Iterator staList = reportList.iterator();
          result out = (result) staList.next();
        %>                                        
           <% if (i!=0){%>
             <input name="search" type="button" id="search" value="Search"  onClick="return onSubmit_Click(document.form,'mfa.action?action=Sta_Report&status=<%=out.getStatusExam()%>');"/>                                                            
         <%} else {%>
              <tr>
                <td colspan="3">data not exist</td>
               </tr>
           <%}%>
    </tbody>
2
Contributors
1
Reply
5
Views
4 Years
Discussion Span
Last Post by LastMitch
0

my current problem right now the button only show when data exist but the button automatically hide when data not exist.

You need to hidden the <input> tags for data not exist to appear.

It should look something like this:

<input type="hidden" name="search" id="search" value="${mfa.action?action=Sta_Report&status=<%=out.getStatusExam()%>}"/> 
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.