Hi,
I have this code which displays the Next and Prev button. There is a check made before calling the Javascript to see if the page before or after exist based on the pageindex. If the page do not exist then even if the user clicks the button nothing will happen. This is what I need. But now the user wants to disable or even make the button invisible if the next or prev page do not exist. I think it can be achieved with the same logic used here but can you guys help me how to rewrite the disable or invisible logic based on this. Thanks for your help.
<tr>
<td align=left>
<input type="button" value="Previous" <%=pageIndex>0?"onClick='prevPage()'":""%>>
</td>
<td align=right>
<input type="button" value="Next" <%=(size/10)==pageIndex?"":"onClick='nextPage()'"%>>
</td>
</tr>
I have this code which displays the Next and Prev button. There is a check made before calling the Javascript to see if the page before or after exist based on the pageindex. If the page do not exist then even if the user clicks the button nothing will happen. This is what I need. But now the user wants to disable or even make the button invisible if the next or prev page do not exist. I think it can be achieved with the same logic used here but can you guys help me how to rewrite the disable or invisible logic based on this. Thanks for your help.
<tr>
<td align=left>
<input type="button" value="Previous" <%=pageIndex>0?"onClick='prevPage()'":""%>>
</td>
<td align=right>
<input type="button" value="Next" <%=(size/10)==pageIndex?"":"onClick='nextPage()'"%>>
</td>
</tr>