I have this code for my buttons:
<FORM ACTION="ReportData_test2.asp" METHOD="POST" NAME="RW">
<INPUT TYPE="hidden" NAME="PageNo" VALUE="1">
<FONT FACE="Verdana, Arial, Helvetica, Sans Serif" SIZE="2">
<INPUT TYPE="submit" VALUE=" First Page " ONCLICK="ShowFirstPage()">
<INPUT TYPE="submit" VALUE=" Prev Page " ONCLICK="ShowPrevPage()">
<INPUT TYPE="submit" VALUE=" Next Page " ONCLICK="ShowNextPage()">
<INPUT TYPE="submit" VALUE=" Last Page " ONCLICK="ShowLastPage()"> <BR>
</FONT>
</FORM>
The each need to go to the next page of a search result. Here is the scripting that goes with it...I know I am missing something, but I can't pinpoint it.
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function ShowFirstPage() {
ShowPage(1);
}
function ShowPrevPage() {
var v = document.RW.PageNo.value;
if(v>1)
ShowPage(--v);
else
ShowPage(1);
}
function ShowNextPage() {
var v = document.RW.PageNo.value;
if(v<<%= lngPage %>)
ShowPage(++v);
else
ShowPage(<%= lngPage %>);
}
function ShowLastPage() {
ShowPage(<%= lngPage %>);
}
function ShowPage(p) {
var oldp = document.RW.PageNo.value;
if(document.all) {
document.all['pg'+oldp].style.visibility = 'hidden';
document.all['pg'+p].style.visibility = 'visible';
}
if(document.layers) {
document.layers['pg'+oldp].visibility = 'hide';
document.layers['pg'+p].visibility = 'show';
}
document.RW.PageNo.value = p;
}
document.RW.PageNo.value = 1;
//-->
</SCRIPT>
bb
<FORM ACTION="ReportData_test2.asp" METHOD="POST" NAME="RW">
<INPUT TYPE="hidden" NAME="PageNo" VALUE="1">
<FONT FACE="Verdana, Arial, Helvetica, Sans Serif" SIZE="2">
<INPUT TYPE="submit" VALUE=" First Page " ONCLICK="ShowFirstPage()">
<INPUT TYPE="submit" VALUE=" Prev Page " ONCLICK="ShowPrevPage()">
<INPUT TYPE="submit" VALUE=" Next Page " ONCLICK="ShowNextPage()">
<INPUT TYPE="submit" VALUE=" Last Page " ONCLICK="ShowLastPage()"> <BR>
</FONT>
</FORM>
The each need to go to the next page of a search result. Here is the scripting that goes with it...I know I am missing something, but I can't pinpoint it.
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function ShowFirstPage() {
ShowPage(1);
}
function ShowPrevPage() {
var v = document.RW.PageNo.value;
if(v>1)
ShowPage(--v);
else
ShowPage(1);
}
function ShowNextPage() {
var v = document.RW.PageNo.value;
if(v<<%= lngPage %>)
ShowPage(++v);
else
ShowPage(<%= lngPage %>);
}
function ShowLastPage() {
ShowPage(<%= lngPage %>);
}
function ShowPage(p) {
var oldp = document.RW.PageNo.value;
if(document.all) {
document.all['pg'+oldp].style.visibility = 'hidden';
document.all['pg'+p].style.visibility = 'visible';
}
if(document.layers) {
document.layers['pg'+oldp].visibility = 'hide';
document.layers['pg'+p].visibility = 'show';
}
document.RW.PageNo.value = p;
}
document.RW.PageNo.value = 1;
//-->
</SCRIPT>
bb