The following code controls the visibility of a page foward and page back button. If on the first round, then the back button is not visible. If on the last round, the forward button is not visible. This works. But in both cases when the other button is not visible, the visible button left or right justifies itself, meaning the user has to shift cursor position. Can't spot the problem. Thanks.
Code:
<TABLE border=0 cellSpacing=0 width= "100%" >
<!-- Start of Page Back block -->
<tr><td align="right" colspan=3 >
<Div id="PageBack" style="<% setstyle("B") %>">
<form id= "frmPageBack" name = "frmPageBack" method="post" action="Footy_Tips_Browse_Entries.asp" >
<input id="txtPageBack" type=hidden name="txtPageBack" value="Y" >
<input id = "cmdPageBack" name="cmdPageBack" type = "reset" value="<<<<" onclick="frmPageBack.submit()" >
</form></Div></td>
<!-- End of Page Back block -->
<!-- Start of Page Foward block -->
<td align="left" colspan=2 >
<Div id="PageFoward" style="<% setstyle("F") %>">
<form id= "frmPageFoward" name = "frmPageFoward" method="post" action="Footy_Tips_Browse_Entries.asp" >
<input id="txtPageFoward" type=hidden name="txtPageFoward" value="Y" >
<input id = "cmdPageFoward" name="cmdPageFoward"
type = "reset" value=">>>>"
style="font-size:3mm; font-family: Arial; color:red" onclick="frmPageFoward.submit()" >
</form></Div></td></tr>
<!-- End of Page Foward block -->
<% Public Function setstyle(B)
If B = "B" then If roundvar = 1 then response.write("display:none") else response.write("display:block") end if
If B = "F" then If roundvar = 26 then response.write("display:none") else response.write("display:block") end if
End Function
%>
</table>
</center>