UltraLite for M-Business Anywhere User's Guide
Tutorial: A Sample Application for M-Business Anywhere
This lesson describes code for scrolling forwards and backwards through the rows of a result set.
Add navigation code to your application
Add the MoveNext function to tutorial.js, immediately after the Insert() function:
function MoveNext()
{
if( ! CustomerTable.moveNext() ) {
CustomerTable.moveLast();
}
}Add the MovePrev function to tutorial.js, immediately after the MoveNext() function:
function MovePrev()
{
if( ! CustomerTable.movePrevious() ) {
CustomerTable.moveFirst();
}
}Add the following procedures to main.html:
function ClickNext()
{
MoveNext();
DisplayCurrentRow();
}function ClickPrev()
{
MovePrev();
DisplayCurrentRow();
}Synchronize your application and test the navigation buttons.
When the form is first displayed, the controls are empty as the current position is before the first row. After the form is displayed, click Next and Previous to move through the rows of the table.
SQL Anywhere Studio 9.0.2
版权所有 © 1989–2005 Sybase, Inc. 部分版权所有 © 2001–2005 iAnywhere Solutions, Inc. 保留所有权利。