Pagination | control | Show < three > and record display related client code:
Increased control in the Listrecordscon.inc
<script language= "JavaScript" >
var pagenum = <%=theCurrentPageNum%>;
Trigger When you click the Select All records on this page check box
function Checkall (form)
{
for (Var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name!= ' chkall ' && e.name!= ' chkallpage ')
e.checked = form.chkall.checked;
}
}
Trigger When you click the Select All records for this class check box
function Checkallpage (form)
{
for (Var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name!= ' chkallpage ')
e.checked = form.chkallpage.checked;
}
}
Check to see if a record is selected
function checkbox (Form)
{
var thelength;
var i,j;
Thelength = Form.chk.length;
i = 0;
j = 0;
while (I<thelength) {
if (form.chk[i].checked)
j + +;
i + +;
}
if (j==0 &&!form.chk.checked) {
Alert ("Please select Record First");
return false;
}
return true;
}
triggered when you click the Delete button
Function del (form)
{
var ClassID;
if (!checkbox (form)) {
return false;
}
Else
If confirm (' Are you sure you want to delete these records? ')){
<% if Thequeryclass <> "" Then%>
ClassID in the For_query form in Query.inc
ClassID = "classid=" +document.form_query.classid.value;
<% Else%>
ClassID = "";
<% End If%>
Theactionscript the suppressed field, generated when the Listrecords () function is invoked
Form.action = Form.theActionScript.value + "_delete.asp" +CLASSID;
Form.submit ();
}
}
var Openwin_add;
var init = "<%=theInit%>";
triggered when you click the Add button
function Add (PN)
{
<% if Thequeryclass <> "" Then%>
ClassID in the For_query form in Query.inc
Auto Select current category
ClassID = "&classid=" +document.form_query.classid.value;
<% Else%>
ClassID = "";
<% End If%>
window.open (' <%=theactionscript%>_edit.asp?pn= ' +pagenum+classid+ ' <%=theTableClassStr%> ' +init, ', ' Width=<%=thewinw%>,height=<%=thewinh%>,resizable=0,scrollbars=yes ');
}
var Openwin_edit;
function edit (ID,PN)
{
window.open (' <%=theactionscript%>_edit.asp?id= ' +id+ ' &pn= ' +pagenum+ ' <%=theTableClassStr%> ', ', ' Width=<%=thewinw%>,height=<%=thewinh%>,resizable=0,scrollbars=yes ');
}
var Openwin_view;
function View (ID,PN)
{
window.open (' <%=theactionscript%>_view.asp?id= ' +id+ ' &pn= ' +pagenum+ ' <%=theTableClassStr%> ', ', ' width=<%=thewinw%>,height=<%=thewinh+12%>,resizable=0,scrollbars=