Well, pretty much. But you're making it a little harder than it needs
to be. It works like this:
onSubmit handler processes input, executes search
onSearchComplete (set using setSearchCompleteCallback()) processes
search results, assigns results items to second variable (VERY
important) and/or appends CLONES (VERY important) of html nodes to
results div. Checks to see if last page of results; if not, calls
gotoPage(nextIndex);
onSearchComplete (set using setSearchCompleteCallback()) processes
search results, assigns results items to second variable (VERY
important) and/or appends CLONES (VERY important) of html nodes to
results div. Checks to see if last page of results; if not, calls
gotoPage(nextIndex);
onSearchComplete (set using setSearchCompleteCallback()) processes
search results, assigns results items to second variable (VERY
important) and/or appends CLONES (VERY important) of html nodes to
results div. Checks to see if last page of results; if not, calls
gotoPage(nextIndex);
onSearchComplete (set using setSearchCompleteCallback()) processes
search results, assigns results items to second variable (VERY
important) and/or appends CLONES (VERY important) of html nodes to
results div. Checks to see if cursor.currentPageIndex >=
cursor.pages.length; if not, calls gotoPage(nextIndex);
====
So you only call execute() once, but your onSearchComplete calls
gotoPage() if necessary, which loops back to onSearchComplete, which
calls gotoPage() if necessary, etc., etc., etc. I.e., gotoPage()
takes care of the subsequent execute()'s for you.
jgee...@mchsi.com
If you're in the Des Moines, IA, area, check out Debra Heights
Wesleyan Church!