I am using individual form for each image.
Code: Select all
<table>
<tr>
<td>
<!--------------------- FIRST PAGE -------------------->
<form name="form1" id="searchForm1" action="" method="get">
<input type='hidden' NAME="direction1" value="start">
<a href="#" onclick="javascript: document.getElementById('searchForm1').submit(); return false;">
<img border="0" img="img" src="/start.gif" alt="" />
</a>
</form>
</td>
<td>
<!--------------------- PREVIOUS PAGE -------------------->
<form name="form2" id="searchForm2" action="" method="get">
<input type='hidden' NAME="direction2" value="previous">
<input type='hidden' NAME="position" value="/%value1%/">
<a href="#" onclick="javascript: document.getElementById('searchForm2').submit(); return false;">
<img border="0" img="img" src="/previous.gif" alt="" />
</a>
</form>
</td>
<td>
<!--------------------- NEXT PAGE -------------------->
<form name="form3" id="searchForm3" action="" method="get">
<input type='hidden' NAME="direction3" value="next">
<input type='hidden' NAME="position" value="/%value2%/">
<a href="#" onclick="javascript: document.getElementById('searchForm3').submit(); return false;">
<img border="0" img="img" src="/next.gif" alt="" />
</a>
</form>
</td>
<td>
<!--------------------- LAST PAGE -------------------->
<form name="form4" id="searchForm4" action="" method="get">
<input type='hidden' NAME="direction4" value="end">
<a href="#" onclick="javascript: document.getElementById('searchForm4').submit(); return false;">
<img border="0" img="img" src="/end.gif" alt="" />
</a>
</form>
</td>
</tr>
</table>
As it is structured now, I would have to add the entries per page selction 4 times - one per form -- which technically acceptableis, but pretty lame looking.
Is there a nice native javascript solution (I don't want to add a JS library) that would be able to pull together the the concept
of "page direction" above with "entries per page" into each get/post request.
Code: Select all
Entries per page <SELECT name=selectName>
<OPTION value=10 selected>10</OPTION>
<OPTION value=25>25</OPTION>
<OPTION value=50>50</OPTION>
<OPTION value=100>100</OPTION>
</SELECT>