logo

Listing search results in groups

Searching domino may be simple and, sometimes, even powerful, but when it comes to displaying the results in a browser we, the developers, are left fairly restricted.

There seem to be several ways of presenting a large list of search results, depending on the site you use and the server they are running.

Consider this screen-grab from the Notes.net Discussion Forum:

Image

And this one from a search on the Microsoft.com homepage:

Image

I'll leave it up to you to decide which you prefer. Me, I'm with the Microsoft version. Not that I'm a great advocate of Microsoft, but the style they use is more common of web-sites nowadays. As ever, Lotus/Iris are not following suit.

Personally, I had never tried to reproduce this numbered-list style of results in domino, as I could see no way of doing it without using complicated scripts. Luckily, Chris Thorpe, of the Reader's Digest, has come up with a "simple" solution he is willing to share with us all.

The screen-grab below is of a search results form ($$SearchTemplateDefault) that uses this method. Doesn't look very "Notesy" does it ;-)

Image

Anyway, how do you do it?! Simple really (when you know how). Start by creating a Computed-Text area on the results form in place of your usual "Next" and "Previous" navigation links. Add the following formula to it:

REM "NOTE: start param must be before count param in the original URL";
pageString := "<a href=\"SearchView?" + @LeftBack(Query_String;"&start") + "&start=";

REM "We are limited to 250 docs by domino!!";
hitNum := @If(TotalHits > 250;250;TotalHits);

adJust := @Integer(hitNum/10);
endDate := @Text(@Adjust([01/01/1900];0;0;adJust;0;0;0);"D0S0");
numRange := @Explode(@TextToTime("01/01/1900 - " + endDate));
numList := (@TextToTime(numRange) - [01/01/1900]) / 86400;

textList1 := @Text(numList*10) + " - " + @Text((numList + 1)*10);
textList10 := @Text(numList * 10);

@If(TotalHits > 10;"<p>"+ @Implode(pageString + textList10 + "&count=10\">" + textList1 + "</a>";" | ");"&nbsp;")

By now you are probably thinking: "What on Earth is all that about?" Don't worry so was I when I first saw it.

Unless you really want to know how, you can simply paste the formula in and it should work after you've changed the name of the view you are searching. If you are like me and want to learn *exactly* what is happening, read on....

Line 1: pageString := "<a href=\"SearchView?" + @LeftBack(Query_String;"&start") + "&start=";

This line works out the what the first part of all the links is going to be. It is important that the "&count=" parameter appears after "&start=" so that it is not included in this part.

Line 2: hitNum := @If(TotalHits > 250;250;TotalHits);

This limits the whole thing to 250 hits - this is the default setting for the HTTP domino server task (NAB).

Line 3: adJust := @Integer(hitNum/10);

Here we divide the number of hits by 10 (hits per page) so we know exactly how many links we need to create.

Now this is where the clever part is.

Line 4: endDate := @Text(@Adjust([01/01/1900]; 0; 0; adJust; 0; 0; 0); "D0S0");

Create a date that is that is same number of days after 1/1/1900 as the number of pages required (adJust).

Line 5: numRange := @Explode( @TextToTime( "01/01/1900 - " + endDate));

The trick - use @Explode to produce a LIST of date strings between 1/1/1900 and the date from Line 4. This will contain the same number of items (dates) as links are required. Cool!

Line 6: numList := (@TextToTime(numRange) - [01/01/1900]) / 86400;

Turn this list of dates in to a list of multiples of 10 by subtracting 1/1/1900 from them all and then dividing by the number of seconds in a day.

Line 7: textList1 := @Text(numList*10) + " - " + @Text((numList + 1)*10);

Creates a list of number ranges from the start number times ten to a number ten greater. ie 0-10:10-20:20-30 etc

Line 8: textList10 := @Text(numList * 10);

Produces a list of values to append to the "&count=" parameter.

Line 9: @If(TotalHits > 10;"<p>"+ @Implode(pageString + textList10 + "&count=10\">" + textList1 + "</a>";" | ");"&nbsp;")

Bring it all together to produce the necessary HTML. Et Voila!

Finally, in Chris Thorpe's own words:

It's perverse, but it works!


To see more of his handywork and to see this technique in action take a look at this food recipe search. You can also download an example database I knocked up by clicking on its screenshot below:

Image



Note: The limitation of 250 documents in the result set is a default domino setting. You can change it using the following notes.ini entry:

QueryMaxResults=XXXX;

I've not tried this, but apparently anything approaching or above 5000 can become unstable.

Thanks to Lahbib Mouran for letting me know about this tip which first appeared here

Feedback

  1. Better way to get sequential numbers

    GREAT POST!!!! (and great site, btw. This is my first time posting to it, I only saw it last week, and I love it so much I've decided that when I put up my own web site I'll put a link to here rather than try doing my own site of tips!)

    I do have a way to improve upon his formula, though. There's a more straightforward way using *+. In formulas, if you had "a":"b" *+ "A":"B" then you get "aA":"aB":"bA":"bB"

    You can use this to get sequential numbers... digits := "0":"1":"2":"3":"4":"5":"6":"7":"8":"9"; zeroto99 := digits *+ digits; zerotoN := @Subset(zeroto99; N + 1);

    So to rewrite his code, I'd use

    REM "NOTE: start param must be before count param in the original URL"; pageString := "<a href=\"SearchView?" + @LeftBack(Query_String;"&start") + "&start=";

    REM "We are limited to 250 docs by domino!!"; hitNum := @If(TotalHits > 250;250;TotalHits);

    adJust := @Integer(hitNum/10); digits := "0":"1":"2":"3":"4":"5":"6":"7":"8":"9"; zeroto99 := digits *+ digits; numlist := @TextToNumber(@Subset(@Subset(zeroto99; adJust + 1); -adJust)); textList1 := @Text(numList*10) + " - " + @Text((numList + 1)*10); textList10 := @Text(numList * 10);

    @If(TotalHits > 10;"<p>"+ @Implode(pageString + textList10 + "&count=10\">" + textList1 + "</a>";" | ");"&nbsp;")

    (Note: This was entered "from the hip" so to speak, it might not work as is, I'm just trying to impart the general idea.)

    1. A great alternative approach

      I think John has found a very good & probably faster method to get the sequential numbers (though for multiples of 10 only?).

      With luck, more people will contribute until we can collectively establish a definitive way of getting round this particular Domino deficency (formatting search results).

      Having @explode work on a number range would make this kind of stuff much easier.

    2. What about SearchOrder=4 param?

      This all works well if you don't mind having the search results in order of the full text relavance. Does anyone have a similar solution if you must display the results in the same order presented in the view? Notes.net has well documented problems using this with the SearchOrder=4 parameter.

      Show the rest of this thread

  2. One Problem

    Great code - thanks. I'm trying to get this working in a normal view template and everything's OK except for the first link (0-50) - which displays No Documents. Looks like Domino doesn't like a Start=0 - any ideas how the code can be modified?

    1. Causes error 500

      Gents, as a former Microsoftie, i'm almost converted to Lotus, however i keep running into the same sort of problem that you've been trying to fix here.

      Since our end-users have been brainwashed into thinking that Microsoft's answers are the only solution out there, we have to respond by getting Notes to perform this sort of work.

      I'm still learning a lot about Notes - in particular, how clunky the whole interface can get. I don't think that i've got searching nailed dow yet, 'cos when i tried to implement this code in my $SearchTemplateDefault i get exceptions like this: HTTP Web Server: Lotus Notes Exception - Comparison operators must be supplied two values of the same data type. [/WELLDYN.COM/directory.nsf/$search?SearchView&Query=fleming&SearchOrder=1&Searc hMax=0&SearchWV=TRUE&SearchThesaurus=FALSE]

      Can you clue me in on what i've gotten wrong ?

      Show the rest of this thread

    2. A smal modification to the code.

      I got the same problem, it dont like start=0, it lists all found entries with that parameter. I modified the code with this:

      In the computed text:

      textList10 := @Text(numList * 10+1); //added a +1 to avoid the start=0

      In the js script:

      function searchDB(path,query) { path+="?SearchView&Query="+query+"&start=1&Count=10"; window.location.href = "/"+path;

      //added the start=1

      Just a small test though, never tried it out fully.

      Regards Leif Pensar Eyeonweb

      Show the rest of this thread

  3. My Implementation (THANKS AGAIN)

    I took this code and ran with it, tinkering along the way. The result is:

    - If there are 15, then you'll see a group "11-15", not "11-20" - An "All" link appears so users have the option of getting all results. - Assuming no more than 250 documents, there are a maximum of 25 groups, so a list of 1 through 25 is hardcoded rather than doing sequential number generation. - The count is customizable through the URL. On our advanced search form is a combo box allowing the user to choose to get results by 10s, 25s, or 50s. This is sent in the "count" argument of the URL. - variable names have been changed to fit within my client's coding standards (integer variables prefixed with "i", etc)

    REM "NOTE: start param must be before count param in the original URL"; REM "We are limited to 250 docs by domino!!"; sOldCount := @Middle(Query_String; "&oldcount="; "&"); sCountNum := @Middle(Query_String; "&count="; "&"); iCountNum := @If(sOldCount != ""; @TextToNumber(sOldCount); sCountNum != ""; @TextToNumber(sCountNum); 10); iHitNum := @Min(TotalHits; 250); @If(iHitNum <= iCountNum; @Return(""); continue); sHitNum := @Text(iHitNum); sStartNum := @Middle(Query_String; "&start="; "&"); sNewCountNum := @Text(iCountNum);

    REM "get number of groups"; iGroups := @Integer((iHitNum - 1) / iCountNum) + 1; REM "It\'s assumed that iCountNum will never be less than 10, so max of 25 groups is hardcoded."; aDigits := 0: 1 : 2 : 3 : 4 : 5 : 6 : 7 : 8 : 9 : 10 : 11 : 12 : 13 : 14 : 15 : 16 : 17 : 18 : 19 : 20 : 21 : 22 : 23 : 24; aStarts := @Text(@Subset(aDigits; iGroups) * iCountNum + 1); aRanges := aStarts + " - " + @Text(@If( iGroups = 1; iHitNum; ((@Subset(aDigits; iGroups - 1) + 1) * iCountNum) : iHitNum));

    sGroups := "<a href=\"?" +@ReplaceSubstring(Query_String; ("&start=" + sStartNum) : ("&count=" + sCountNum); "") + "&count=" + sNewCountNum + "&start=" + aStarts + "\">" + aRanges + "</a>";

    sAll := "<a href=\"?" + @ReplaceSubstring( Query_String; ("&count=" + sCountNum) : ("&start=" + sStartNum); ("&count=" + sHitNum) : "") + @If(@Contains( Query_String; "&oldcount="); ""; "&oldcount=" + sNewCountNum) + "\">All</a>";

    @Text(""+ @Implode(sGroups : sAll;" | ")+ "")

      • avatar
      • Jake
      • Fri 16 Feb 2001

      Thanks John

      Not had chance to try it yet but it sounds great in theory. Now is time to stand and salute the genius of Chris Thorpe for inventing this crazy solution in the first place.

      Thanks also to all of you, like John and Chris, who've put back some of what you take away from the site...

      Jake

      • avatar
      • Mike Nye
      • Tue 8 Jan 2002

      Show Current Page Mod.

      Here is a slight modification/addition to John?s code. This shows the user which page they are on by disabling the current link.

      Replace the last line with these three lines:

      outputHTML := @Text(""+ @Implode(sGroups : sAll;" | ")+ ""); currentLink := @MiddleBack(outputHTML; ">" + sStartNum + " -" ; "<a"); @ReplaceSubstring( outputHTML ; currentLink ; "")

      I am sure this could be done in just one line, but I prefer the readability of having it in three.

      Show the rest of this thread

    1. Re: My Implementation (THANKS AGAIN)

      Could you re-attach the .zip file "forgetmenot.zip". Seems like it's corrupted over a period of time..

      Thanks

  4. A better Help for DominoSearch

    First of all i would like to say this tip is very smart.

    I have use the code with some modification and it works well. I add a simple JavaScript-Code to the View to show the Number for every Document listet in the search result.

    But i have a question. Is there a better help for NotesSearchoptions than the NoteHelp? I am Searching for a Help whuich explains everything.

    What do FuzzySearch, What do ... etc.

    Thanx for comments.

  5. A range of numbers, just add HTML

    I just saw this site 10min. ago. The thread on creating a range of numbers with regular intervals intrigued me, so I hacked this together. Might be useful?

    I start by creating a list of numbers, then I find the number of intervals I need. By *+ the numbers I get a faily large interval list wich I again * with my count property. Then i cut off the un-needed bits. Find the trailing values if any, and implode the result.

    I haven't tested this much, (Just opened it in a browser, once) But the theory is solid.

    Values := "0":"1":"2":"3":"4":"5":"6":"7":"8":"9"; Range := @Integer(TotalHits/Count); Scope := @SubSet( @TextToNumber(Values*+Values)*Count; Range ); Remainder := @Modulo(TotalHits;Count); LastEntry := @Subset(Scope;-1)+Count; Trailing := @If(Remainder>0; " | " +@Text(LastEntry)+ "-" +@Text(LastEntry+Remainder); ""); @Implode( @Text(Scope+1)+ "-" +@Text(Scope+Count); " | " ) + Trailing;

    Regards, and keep on hacking. Jens. caustics@themax.org - www.themax.org

    • avatar
    • John Clark
    • Thu 13 Dec 2001

    Pseudo-TotalHits for a ViewTemplate?

    Do you know of a way to get the # of documents returned in a view. Basically, I want a 'TotalHits' for a ViewTemplate field. I was thinking of getting this number via a WQO agent and have it get a count of docs in a view. Ideas??

      • avatar
      • Radu
      • Sat 22 Dec 2001

      Re: Pseudo-TotalHits for a ViewTemplate?

      If you want to get the number of documents in a view, one way of doing it would be to use DbColumn. Yes, I know, it's not idea, but for a small scale solution it works:

      max := @Elements(@DbColumn("" ; "" ;"ViewName"; 1));

      Does this answer your question?

      Show the rest of this thread

    • avatar
    • Ben
    • Fri 21 Dec 2001

    What about categorized views?

    Has anyone tried this with categorized views?

    I think this solution is really great, and I'll give it a try afetr the holidays.

    If anyone has experienced this with categorized views, your comments would be appreciated.

    I want to apply something similar to all views, not only search results.

    I wish you all a nice holiday season!

    Ben ;0)

    1. Re: What about categorized views?

      Hey all, This tip is great. I used it for all views on the intranet i m currently working on. Anyway, i did not manage to make it work with categorized view.

      We need to have a hierarchical notion in the "&start=" parameter, based on the category/subcategory/... level.

      Unless any of you out there found a solution for categorized views, i m afraid i ll have to use an agent to calculate this.

      hmm... this smells poor performance! so any idea for categorized views is appreciated.

      Great tip again, worth for views as for search results.

  6. Listing Search Results in groups By Chris Thorpe

    Please tell me:- 1. Are you using a $Search Form to capture the search input criteria ? 2. Where is the value of "TotalHits" set in the code?

    Many Thanks

  7. Can this be done using an agent?

    Hi,

    I think this is exactly what I need to navigate through a search. The only thing different is that I am using an agent to perform a search of the database. The search results page is actually a function in the agent that prints the results as HTML. Can I use the code that is posted in my agent? There are going to be searches where I would need to put navigation on the page.

    Thanks.

    1. Re: Can this be done using an agent?

      Firstly, I'd like to salute Chris Thorpe for his ingenious solution and Jake for his invaluable site. I could have sat in front of my PC forever and never thought of doing search results grouping. Who said beer kills brain cells...

      I rebuilt the 'search results in groups' code as a LotusScript WebQueryOpen agent cos of the need for looping and easier debugging.

      My database uses a $$SearchTemplateDefault form to display the search results and uses the WQO agent to nicely format them. The fields 'ResultsGroups' and 'DisplayResultsTitle' are fields on the $$STD form which store the result of the WQO agent. The form also has the neccessary fields for holding TOTALHITS, COUNT, START etc. The search is done in a database on the fields 'Srnm', 'PrefNameMix_Case' and 'SalyNumb'. This text and other irrelevant information is deleted from the results title string cos the user doesn't need to see it. WQO code contains references to a CSS file.

      WQO Code follows: 'Declare Local Variables Dim nsSession As New NotesSession Dim ndContext As NotesDocument Dim strQuery As String Dim strQueryString As String Dim intHits As Integer Dim intCount As Integer Dim intStart As Integer Dim strResultsTitle As String Dim strResultsGroups As String Dim strStart As String Dim strCount As String Dim intLoops As Integer Dim intIndex As Integer On Error Goto OtherError

      'Get web document to manipulate Set ndContext = nsSession.DocumentContext 'Retrieve values from onscreen document intCount = ndContext.Count(0) intHits = ndContext.TotalHits(0) intStart = ndContext.Start(0) strQuery = ndContext.Query(0) strQueryString = ndContext.Query_String(0) 'Kill information user doesn't need to know strQuery = ReplaceSubstring(strQuery,"[Srnm]","") strQuery = ReplaceSubstring(strQuery,"[PrefNameMix_Case]","") strQuery = ReplaceSubstring(strQuery,"[SalyNumb]","") strQuery = ReplaceSubstring(strQuery,"Contains","") strQuery = Trim$(strQuery) 'Depending on how many hits we have for the query Select Case intHits Case 0 strResultsTitle = "<SPAN CLASS='WPTBoldBlue'>No documents found for </SPAN>" _ & "<SPAN CLASS='Blue'>'" & strQuery & "'</SPAN>" Case 1 strResultsTitle = "<SPAN CLASS='WPTBoldBlue'>1 document found for " _ &"</SPAN><SPAN CLASS='Blue'>'" & strQuery & "'</SPAN>" Case Is <= 10 strResultsTitle = "<SPAN CLASS='WPTBoldBlue'>Showing " & Cstr(intHits) _ & " of " & Cstr(intHits) & " documents for </SPAN><SPAN CLASS='Blue'>'" & strQuery & "'</SPAN>" Case Is > 10 'Kill the existing Start and Count variables cos we need to set our own strQueryString = ReplaceSubString(strQueryString,"&Start=" & Cstr(intStart),"") strQueryString = ReplaceSubString(strQueryString,"&Count=" & Cstr(intCount),"") 'Get the number of results groups If intHits Mod 10 = 0 Then intLoops = (intHits \ 10) Else intLoops = (intHits \ 10) + 1 End If 'Loop thru the number of times we need to make groups for 'e.g. If we return 78 results for a search, 'we need to make 8 results groups 'These would be 1-10, 11-20, 21-30, 31-40, 41-50, 51-60, 61-70, 71-78 'The 'All' results group is added at the end. For intindex = 1 To intLoops Select Case intIndex Case 1 strResultsGroups = "<A HREF='?" & strQueryString & "&Start=1&Count=10" & "'>1 - 10</A>" Case 2 If intHits => 20 Then strStart = Cstr((intIndex - 1) + 10) strResultsGroups = strResultsGroups & " | <A HREF='?" & strQueryString _ & "&Start=" & strStart & "&Count=10'>" & strStart & " - " & Cstr(intIndex * 10) & "</A>" Else strStart = Cstr((intIndex - 1) + 10) strResultsGroups = strResultsGroups & " | <A HREF='?" & strQueryString _ & "&Start=" & strStart & "&Count=10'>" & strStart & " - " & Cstr(intHits) & "</A>" End If Case intLoops strStart = Cstr(((intIndex - 1) * 10) + 1) strResultsGroups = strResultsGroups & " | <A HREF='?" & strQueryString _ & "&Start=" & strStart & "&Count=10'>" & strStart & " - " & Cstr(intHits) & "</A>" Case Else strStart = (((intIndex - 1) * 10) + 1) strResultsGroups = strResultsGroups & " | <A HREF='?" & strQueryString _ & "&Start=" & strStart & "&Count=10'>" & strStart & " - " & Cstr(intIndex * 10) & "</A>" End Select Next intIndex 'Add the 'All' results group strResultsGroups = strResultsGroups & " | <A HREF='?" & strQueryString _ & "&Start=1&Count=" & Cstr(intHits) & "'>All</A>" 'If we're at the last results group, set the count to be all and not 10 as used by 'the other results groups If (intStart + intCount) > intHits Then strCount = Cstr(intHits) Else strCount = Cstr(intStart + (intCount - 1)) End If strResultsTitle = "<SPAN CLASS='WPTBoldBlue'>Showing documents " & Cstr(intStart) _ & " to " & strCount & " of " & Cstr(intHits) & " for </SPAN><SPAN CLASS='Blue'>" _ & Chr$(34) & strQuery & Chr$(34) & "</SPAN>" Case Else 'Doh! End Select 'Only display results groups if there is something to show If Len(strResultsGroups) > 0 Then ndContext.ResultsGroups = "[" & strResultsGroups & "]" End If

      'Display the results title information ndContext.DisplayResultsTitle = "[ <BR>" & strResultsTitle & "]" Exit Sub OtherError: ndContext.DisplayResultsTitle = "Error '" & Error$(Err) & "' occurred at line " & Cstr(Erl) Exit Sub

      The function 'ReplaceSubString' I scrounged from the WWW.MARTINSCOTT.COM site so thanks must go to them.

      Function ReplaceSubstring(fullString As String, oldString As String,newString As String) As String Dim lenOldString As Integer Dim intPos As Integer On Error Goto ReplaceSubstringError lenOldString = Len(oldString) intPos = Instr(fullString, oldString ) Do While intPos > 0 And oldString <> "" fullString = Left (fullString, intPos - 1) & newString & Mid (fullString, intPos + lenOldString) intPos = Instr (intPos + Len(newString), fullString, oldString) Loop ReplaceSubstring = fullString Exit Function ReplaceSubstringError: ReplaceSubstring = fullString Exit Function End Function

      Hope this helps someone somewhere for something...

  8. Just a beginner

    This sounds and works very nicely but I have run into a problem when using in that the code does not work for me simply by cutting and pasting. The URL I pass to the view is:

    /ClePunk/ClePunkWall.nsf/LISTWALLS?searchview&Query=mark&Start=4&Count=3

    The code as is kills the &Query="value" so I had to correct for this. Is this necessary or did I miss something?

  9. Setting TotalHits

    How do you determine the number of documents that are found by the &Query value? This is the one piece I do not have working. I see an entry that says to try the @Element with @DBColumn but that will return the total number in the view not the number that meet the &Query value. So, how is this done?

    1. Re: Setting TotalHits - use the inbuilt fields

      Domino returns TotalHits as one of the fields you can analyze. I also use QueryMax as often I set the QueryMax to be less than 250 i.e. 100, and only want the paged or grouped results to display up to 100, so I use the formula @If(QueryMax<TotalHits;QueryMax;TotalHits) for displaying results, and use

      iHitNum := @Min(TotalHits; QuerMax);

      if using the syntax as provided by John Smart earlier in this thread.

      tq

  10. Allowing both navigator types

    I have modified the original code to allow both navigator types (1 - 5 | 6 - 10 and, [1] 2 3 4). In addition, I have included code to add the Previous and Next links depending on where in the search the user is.

    This code requires the TotalHits, Start, Count, and Query fields be present on the form.

    REM "The following variable conrols the type of navigator created, 1 (Example. 1-10 | 11 - 20), 2 (Example: 1 2 3)"; TypeNav:=2;

    @If(TotalHits<=Count;@Return("");"");

    REM "Create beginning anchor"; pageString:="<a href=\"?SearchView&Query=" + Query + "&Count=" + @Text(Count) + "&Start=";

    REM "We are limited to 250 docs by domino!!"; hitNum:=@If(TotalHits > 250;250;TotalHits);

    adJust := @Integer(hitNum/Count); endDate := @Text(@Adjust([01/01/1900];0;0;adJust;0;0;0);"D0S0"); numRange := @Explode(@TextToTime("01/01/1900 - " + endDate)); numList := (@TextToTime(numRange) - [01/01/1900]) / 86400;

    NumListBeg:=numList*Count + 1; NumListEnd:=@Min((numList + 1)*Count;TotalHits); StartNum:=@Integer((Start-1)/Count) + 1; StartNumMod:=@Modulo((Start-1);Count); textList1 := @If(TypeNav=1;@Text(NumListBeg) + " - " + @Text(NumListEnd);TypeNav=2;@Text(NumList + 1);@Return("")); textList10 := @Text(numList * Count + 1); StartText:=@Text(@Subset(@Subset(TextList1;StartNum);-1));

    REM "Recompute list1 and list10"; TextList1Left:=@Text(@If(StartNum=1;"";@Subset(TextList1;StartNum - 1))); TextList1Right:=@Text(@If(StartNum=@Elements(TextList1);"";@Subset(TextList1;-@E lements(TextList1)+StartNum))); TextList10Left:=@Text(@If(StartNum=1;"";@Subset(TextList10;StartNum - 1))); TextList10Right:=@Text(@If(StartNum=@Elements(TextList10);"";@Subset(TextList10; -@Elements(TextList10)+StartNum)));

    REM "Write out HTML"; PrevHTML:=pageString + @Text(@Max(Start-Count;1)) + "&Login=1\">Previous " + @Text(Count) + " results " + @Text(@Max(Start-Count;1)) + " - " + @Text(@Max(Start-Count;1) + Count) + "</a> &nbsp;&nbsp;"; NextHTML:=" &nbsp;&nbsp;" + pageString + @Text(Start+Count) + "&Login=1\">Next " + @Text(Count) + " results " + @Text(Start+Count) + " - " + @Text(TotalHits) + "</a>"; DeviderText:=@If(TypeNav=1;" | ";TypeNav=2;" &nbsp;";" "); TypeHTMLAll:=""+ @Implode(pageString + textList10 + "&Login=1\">" + textList1 + "</a>";DeviderText); TypeHTML:=""+ @If(TextList1Left!="";@Implode(pageString + textList10Left + "&Login=1\">" + textList1Left + "</a>";DeviderText) + DeviderText;"") + "[ " + StartText + " ]" + @If(TextList1Right!="";DeviderText+@Implode(pageString + textList10Right + "&Login=1\">" + textList1Right + "</a>";DeviderText);""); "<p>" + @If(Start=1;"";PrevHTML) + @If(@TextToNumber(@Text(StartNumMod))=0;TypeHTML;TypeHTMLAll) + @If((@TextToNumber(@Text(Start))+@TextToNumber(@Text(Count)))>@TextToNumber(@Tex t(TotalHits));"";NextHTML)

    1. Re: Allowing both navigator types

      I've used this particular version, many thanks for posting, which works very well except for various search string scenarios.

      For instance if I search for "R&D" in Notes and "R%26" on the web (hex to work round the ampersand problem) I get two different result sets and clicking on the subsequent page numbers following the first page result produces an error.

      The other big problem is searching for strings in quotes e.g. "instrument loop diagrams", again the first results set 1-10 is fine but selecting the links for subsequent pages bring back a "search string empty" error even though it looks ok to me e.g. "<a href="Search?SearchView&Query="instrument loop diagrams"&SearchFuzzy=FALSE&SearchWV=FALSE&Count=10&start=21&">3</a>"

      Any suggestions greatly appreciated

  11. Altavista style links (Next and Previous links)

    I must say that I've used the dynamic number generation technique many times already in many different applications. Thank you Chris!!

    But there were some limitations that I found. Mainly if there is a huge number of pages of results the number of links would be really big. So I played around with the code and developed a way that only a certain number of links to pages are shown at one time. This functionality is much like how Altavista currently operates.

    So here's the code below to get this going so a user can navigate a view:

    REM "Define how the list should act"; numPerPage := 10; numLinks := 5;

    REM "Get the total number of items"; lookup := @DbColumn( "" : "NoCache"; ""; "ViewName"; 1 ); numDocs := @Elements( @If( @IsError( lookup ); ""; lookup ) );

    REM "Generate the number list"; numPages := @Integer( numDocs / numPerPage ); @Set( "numPages"; @If( numPages = ( numDocs / numPerPage ); numPages - 1; numPages ) ); numRange := @Explode( @TextToTime( "01/01/1900 - " + @Text( @Adjust( [01/01/1900]; 0; 0; numPages; 0; 0; 0 ); "D0S0" ) ) ); numList := ( @TextToTime( numRange ) - [01/01/1900] ) / 86400; numItems := @Elements( numList );

    REM "Generate the numbers"; startNums := @Text( numList * numPerPage + 1 ); endNums := @Text( @TextToNumber( startNums ) + numPerPage - 1 ); @Set( "endNums"; @If( numDocs < @TextToNumber( @Subset( endNums; -1 ) ); @Replace( endNums; @Subset( endNums; -1 ); @Text( numDocs ) ); endNums ) );

    REM "Get the current start and end positions"; curStartNum := @Middle( @LowerCase( Query_String_Decoded ); "&start="; "&" ); @Set( "curStartNum"; @If( curStartNum = ""; "1"; curStartNum ) ); curIndex := @Member( curStartNum; startNums ); curEndNum := @If( curIndex = 1; @Subset( endNums; 1 ); @Subset( @Subset( endNums; curIndex ); -1 ) );

    REM "Get the next and previous start numbers"; prevStartNum := @If( curIndex > 1; @Subset( @Subset( startNums; curIndex - 1 ); -1 ); "" ); nextStartNum := @If( curIndex != numItems; @Subset( @Subset( startNums; curIndex + 1 ); -1 ); "" );

    REM "Limit the number of links to be shown"; startIndex := @If( curIndex > @Round( numLinks / 2 ); curIndex - @Integer( numLinks / 2 ); 1 ) - 1; @Set( "startIndex"; @If( startIndex > ( numItems - numLinks ); numItems - numLinks; startIndex ) ); @Set( "startNums"; @Subset( @Subset( startNums; startIndex + numLinks ); -numLinks ) ); @Set( "endNums"; @Subset( @Subset( endNums; startIndex + numLinks ); -numLinks ) );

    REM "Define constants"; linkS := "<A href=\"" + URL + @If( @Contains( URL; "!OpenDocument" ); ""; "!OpenDocument" ) + "&Start="; linkM := "\">"; linkE := "</A>";

    REM "Generate the HTML "; "[ " + @If( prevStartNum = ""; ""; linkS + prevStartNum + linkM + "&lt;&lt; Prev" + linkE + " | " ) + @ReplaceSubstring( @Implode( linkS + startNums + linkM + startNums + " - " + endNums + linkE; " | " ); linkS + curStartNum + linkM + curStartNum + " - " + curEndNum + linkE; "<B>" + curStartNum + " - " + curEndNum + "</B>" ) + @If( nextStartNum = ""; ""; " | " + linkS + nextStartNum + linkM + "Next &gt;&gt;" + linkE ) + " ]"

    That's pretty much it. Best thing is you can play around with how many docs are shown on a page and how many links should be displayed at any one time by changing the numPerPage and numLinks variables respectively.

    Cheers.

    Brad

    1. How to do this?(Next and Previous links)

      When I use Brats code for my embedded single category view, it is not working properly. I am having around 500 documents in that view. I am triggering this view by the below formula:

      db := @ReplaceSubstring( @Subset( @DbName; -1); "\\"; "/"); view:="$$ViewTemplate+for+assetlistingview"; "["+"<a href = /"+db+"/"+view+"?OpenForm&Start=1&Count=10&ParentUNID="+@Text(@DocumentUniqueID) +"&AutoFramed&count=10&start=1>"+"Click here to view asset listing"+"</a>]"

      Can anyone please explain in detail.

      I need : [<Previous] | 1-10 | 11-20 | ......| 491-500 | [Next>] In the above, I want only first 4 pages displayed. Once user clicks Next, it should navigate to next 5th page. 1-10 will be disappear and Previous will display. How to achieve it?

      Thanks in advance. ***************** With Regards, REDDY

  12. Let JavaScript create the links

    This JavaScript function may be used to create the link groups for search results or for a view. Place it on any $$viewtemplate or $$searchtemplate and pass the total to it.

    /* -------------------------------------------------------------------------------- --- return middle of the string example: middle('&count=25&start=1&', '&count=', '&') will return: '25' -------------------------------------------------------------------------------- ----*/ function middle(str, ina, inb){ // return middle of the string //alert('middle function'); var startix = str.indexOf(ina); var endix = str.indexOf(inb, startix + 1); var newStr = ''; if (startix >= 0) { if (endix < 0) {endix = str.length;} newStr = str.substring(startix + ina.length, endix); } else {newStr = ''; } return newStr; } // end of function middle() /* -------------------------------------------------------------------------------- --------------------------------------- Generate links in groups place this script on a $$viewtemplate or $$searchtemplate

    Input parameters: total - the total number of documents in the view or search result format - the format of the generated links 0 (or omitted) generates page numbers, ex. Previous | 1 | 2 | 3 | Next 1 generates groups, ex.. Previous | 1 - 4 | 5 - 8 | 9 - 10 | Next when you call the original view the URL should include two parameters: &count will be used to calculate the intervals &start must be the last parameter in the URL defaults &count=30&start=1 place call to this function on the $$...template at the spot where you want the links to appear set the total passed to this function to TotalHits or use @dbLookup to set it to the number of documents in the view -------------------------------------------------------------------------------- -----------------------------------------*/ function generateLinks(total, format) { // generate a range of links //alert('generateLinks, total = ' + total); function makeLink(curStart, linkText) { // create the <a> tag (internal function) var tmpLink = ''; tmpLink = '<a '+ style + ' href="' + shortLoc + '&start=' + curStart + '" >' ; tmpLink = tmpLink + linkText + '</a>'; return(tmpLink ); } // end of internal function makeLink

    var loc = String(window.location.href); //alert('location=' + loc); loc = loc.toLowerCase(); //alert('location.lowercase=' + loc); var nextLink = 'Nästa'; var prevLink = 'Föregående'; var nextLink = 'Next'; var prevLink = 'Previous'; var style = ''; var links = ''; var ix = loc.indexOf('&start='); // &start= must be the last parameter //alert('ix=' + ix); var shortLoc = loc; if (ix < 0) { start = 1; } else { shortLoc = loc.substring(0,ix); start = parseInt(middle(loc, '&start=', '&'),10); } ix = loc.indexOf('&count='); if (ix < 0) { count = 30 ; shortLoc = shortLoc + '&count=' + count; } else { count = parseInt(middle(loc, '&count=', '&'),10); }

    nextStart = start + count; prevStart = start - count; if (nextStart < total) { nextLink = makeLink(nextStart, nextLink); } if (prevStart > 0) { prevLink = makeLink(prevStart, prevLink); }

    ix = total/count; if (total % count == 0) {ix = ix - 1}; // set number of links

    for (var j = 0; j <= ix; j++) { // create all the links thisStart = j*count + 1; thisEnd = thisStart + count - 1; if (thisEnd > total) {thisEnd = total } if (thisStart == start) {style = 'style="font-weight: bold" '; } else { style = ''} if (format) {thisText = '' + thisStart + ' - ' + thisEnd; } else {thisText = String(j + 1); } links = links + ' | ' + makeLink(thisStart, thisText); } document.writeln(prevLink + links + ' | ' + nextLink);

    } // end of function generateLinks()

    /Eva

    1. Re: Let JavaScript create the links

      I'm looking for a script that will do a small portion of this. I am seperating MANY long (such as 400 page) .txt files into individual HTML pages. I need an automated method of taking a folder full of these raw HTML pages and auto-generating Previous/Next links. Thankfully, the filenames in a given folder follow the format "page-0001.html". So page 247 is named "page-0247.html". I need to have Previous/Next links generated near the top and the bottom of each page. Does anyone want to take a stab at this one?

    • avatar
    • Jake Howlett
    • Thu 27 Nov 2003

    New Domino 6 Alternative

    With Domino 6 we don't need all this trickery as we have new @Function such as @While.

    The code to create the navigation list can be simplified to:

    _________________________________

    REM {Create links for each page of results for a search};

    viewname:="vwSearch"; count:=10; options:="&SearchFuzzy=True";

    link := "<a href=\""+viewname+"?SearchView&Query=" + Query + "&start=";

    start:=1; @While(start<totalhits; @If(@Text(start) = @UrlQueryString("start"); html:=html + "<b>[ " + @Text(1+(start-1)/10) + " ]</b> "; html:=html + link + @Text(start) + "&count=" + @Text(count) + options + "\">[ " + @Text(1+(start-1)/10) + " ]</a> "); start:=start+10 );

    html _________________________________

    Some time soon I will update the article or write a new one...

    Jake

      • avatar
      • Sourav
      • Wed 3 Mar 2004

      Re: New Domino 6 Alternative

      Jake,

      I tried to add the Previous and next functionality to display documents in web. I added it in $$ViewTemplate. Everything works fine when all the documents are shown. Consider a case when a group of documents are not visible to the user because his name is not in the Authors / Readers field.

      This results in blunder.... Click on different links and it loads the same documents. One of the links towards the end loads a different set of documents.

      Then I tried using Domino's @DbCommand("Domino"; "ViewNextPage").

      I checked the Query_String, initially the url had........&start=1............ After the above DbCommand was run, the Query_String was.............&start=172..... though it actually showed the next correct document..

      What is Domino upto????

      • avatar
      • Bart
      • Thu 11 Mar 2004

      Re: New Domino 6 Alternative

      This was a really nice tip.

      I adapted it for use with a normal view (not just for searching) by doing an @elements(@dblookup)) to get the total hits.

      Not great for performance, I suppose, but I don't notice any problems with a small database.

      I also added a check to see if the start URL parameter was null and start=1, so that I could bold the first group when you first open the view.

      GroupBy:=30; Count:=GroupBy;

      link := "<a href=\""+@ViewTitle+"?openView&start=";

      TotalHits:=@Elements(@DbColumn("":"";"";@ViewTitle;1));

      start:=1; StartURLQry:=@UrlQueryString("start");

      @While(start<totalhits; @If(@Text(start) = StartURLQry | (StartURLQry="" &Start=1); html:=html + "<b>[ " + @Text(1+(start-1)) + " - " + @If(Start+GroupBy>TotalHits;@Text(TotalHits);@Text((start+GroupBy-1)))+ " ]</b> "; html:=html + link + @Text(start) + "&count=" + @Text(count) + "\">[ " + @Text(1+(start-1)) + " - " + @If(Start+GroupBy>TotalHits;@Text(TotalHits);@Text((start+GroupBy-1))) + " ]</a> ");

      start:=start+GroupBy );

      html

    • avatar
    • Charles Davis
    • Tue 20 Jan 2004

    Searching from $$SearchTemplateDefault

    Is it possible to include the search box in the $$SearchTemplateDefault form?

    I've successfully implemented the search function on all other forms. But when I try to do a search from a search results pages, I always get a "No Documents Found for query "undefined"" message.

    In debugging the "doSearch" function, there doesn't seem to be an object passed to this function.

    Is this because the $$SearchTemplateDefault form is always read-only?

    1. combined solution

      Hi, i created a different version, this version works on categorized views, doesn't create a link for the current page, adds a previous and next link, if available, shows always 5 links and keeps the current page in the middle, except for begin and end. This is also XHTML compliant.

      Cheers, Marijn.

      @If(@Elements(ArgNames)=0;@Return("");""); StartIndex:=@Member( "start"; @LowerCase( ArgNames ) ); Start:=@If( StartIndex=0; 1; @TextToNumber( @Subset( @Subset( ArgValues; StartIndex ); -1 ) ) ); CountIndex:=@Member( "count"; @LowerCase( ArgNames ) ); Count:=@If(CountIndex=0; 10; @TextToNumber( @Subset( @Subset( ArgValues; CountIndex ); -1 ) ) ); xcount:=Count; nrCurrentPage :=(Start-1)/Count; currentPage:=@Text(nrCurrentPage); viewPath:=DbPath+"?open"; pageString := "<a href=\""+viewPath ;

      REM "We are limited to 250 docs by domino!! (can be changed in serverdoc, but 250 should be enough)."; hitNum := @Min(250;Total); REM "max = 5 items"; TotalPagesTmp := @Integer(hitNum/xcount); nrTest:=@Modulo(hitNum;xcount); TotalPages:=@If(nrTest=0;TotalPagesTmp-1;TotalPagesTmp); adJust := TotalPages; tmpToList := @Explode(@Repeat("<td class=\"p-link\">&&";5);"&&");

      endDate := @Text(@Adjust([01-01-1900];0;0;adJust;0;0;0);"D0S0"); numRange := @Explode(@TextToTime("01/01/1900 - " + endDate)); numList0 := (@TextToTime(numRange) - [01-01-1900]) / 86400; numList1 := @If(@Elements(numList0)<5;numList0;nrCurrentPage<3;@Subset(numList0;5);@Subset(n umList0;nrCurrentPage+3)); numList := @If(@Elements(numList1)>5;@Subset(numList1;-5);numList1);

      textList1 := @Text(numList*xcount+1) + " - " + @Text(@Min((numList + 1)*xcount;hitNum)); textList10 := "&amp;start="+ @Text(numList*xcount+1); txNext10 := "&amp;start="+ @Text(Start+Count); txPrev10 := "&amp;start="+ @Text(Start-Count); textListTmp := @Replace(@Text(numList);currentPage;"<td class=\"p-active\">"); textListTd := @Replace(textListTmp;@Text(numList);tmpToList); tr3:="<td class=\"p-previous\">"+pageString+"&amp;count="+@Text(xcount)+txPrev10+"\">&lt; previous</a>| </td>"; tr2:="<td class=\"p-next\"> | "+pageString+ "&amp;count="+@Text(xcount)+txNext10+"\">next &gt;</a></td>"; tr1:="<table class=\"p-paginator\" cellspacing=\"0\"><tr><td class=\"p-text\">More results:</td>"; rnav1:=tr1+tr3+@Implode(textListTd+pageString+ "&amp;count="+@Text(xcount)+ textList10+"\">" + textList1 + "</a>";"</td>")+tr2+"</td></tr></table>"; rnav2:=tr1+@Implode(textListTd+pageString+ "&amp;count="+@Text(xcount)+ textList10+"\">" + textList1 + "</a>";"</td>")+tr2+"</td></tr></table>"; rnav3:=tr1+tr3+@Implode(textListTd+pageString+ "&amp;count="+@Text(xcount)+ textList10+"\">" + textList1 + "</a>";"</td>")+"</td></tr></table>"; @If(Total < xcount;"&nbsp;"; Start=1;rnav2;(Start+Count)>Total;rnav3;rnav1)

  13. A few enhancements here

    I modified this already awesome formula to be alittle bit truer and a little bit more flexible: 1. a variable xcount allows you to quickly ocnfigure the record count. 2. The starting point is 1 instead of 0. 3. The ending point is the TotalHits instead of a blind mathematical multiple. 4. I also added a textual display record.

    enjoy. i didnt read this whole thread som i dont know if these enhances were already done.

    REM "NOTE: start param must be before count param in the original URL"; xcount:=25; qs:=@Middle(Query_String+"&";"Query=";"&"); sv:=@Middle(Query_String+"&";"sv=";"&"); pageString := "<a href=\"/"+dbname+"/"+ViewName+"?SearchView&Query=" + qs + "&start=";

    REM "We are limited to 250 docs by domino!!"; hitNum := @If(TotalHits > 250;250;TotalHits);

    adJust := @Integer(hitNum/xcount); endDate := @Text(@Adjust([01/01/1900];0;0;adJust;0;0;0);"D0S0"); numRange := @Explode(@TextToTime("01/01/1900 - " + endDate)); numList := (@TextToTime(numRange) - [01/01/1900]) / 86400;

    textList1 := @Text(numList*xcount+1) + " - " + @Text(@Min((numList + 1)*xcount;hitNum)); textList10 := @Text(numList * 25+1); tr1:="<tr><td>Displaying "+@Text(Start)+" to "+@Text(@Min(Start+Count;TotalHits))+" of "+@Text(TotalHits)+" Total...</td></tr>"; rnav:="<table>"+tr1+"<tr><td>"+@Implode(pageString + textList10 + "&count="+@Text(xcount)+"&sv="+sv+"\">" + textList1 + "</a>";" | ")+"</td></tr></table>"; @If(TotalHits > xcount;rnav ;"&nbsp;")

  14. Paging more than 250 docs, PRETTY COOL!

    Hi, i use the same code from this "post", and i have managed to bypass this fool limitation of 250 documents.

    I dont know if changing QueryMaxResults=XXXX; with a number bigger then 250, would let the code work properly, i mean by showing correctly the paging...

    and if somehow you dont have how to change this notes.ini variable... here is the code i´ve built for making this possible...

    little explanation of MY PROBLEM:

    i have created like a photoAlbum based on domino for one of our clients, and you can split this photos for different Categories.

    Once the user clicks one of these categories, it will show him it´s thumbnails...

    So the client has a category with more than 800 photos, and he found this bug.

    i set it up to show 12 hits per page.

    so 250 / 12 = 20,83333 = 21 pages.

    1 2 3 4 5 .... 21 Next>>

    when the user started clicking on "next>>" the results were fine, but the paging not. it couldnt go for 22, 23,24,25( i meant show the label "22" , "23" red highlighted) cause of this "incomplete" code.

    So here it is, i hope it will solve your paging problem too , maybe with a few mods.

    FIRST : At the $$SearchTemplate form , at its bottom, you might have something like this:

    </script> <tr align="center" valign="middle"> <td height="50" colspan="4" class="Linha03"><Computed Value><Computed Value><Computed Value></td> <------------------------------ </tr> <tr align="center" valign="middle"> <td height="50" colspan="4" class="Linha03">Página Atual: <Computed Value></td> </tr> </table>

    The important line is indicated with this "<------"

    as u can see, it has 3 computed values..

    the first one , is the "Previous" nav button, in my case the code is(keep this code):

    view = @ViewTitle; pageString := "<a class=Pag href=\"" + view + "?SearchView&Query=" + Query + "&start="; hitNum := @If(TotalHits > 250;250;TotalHits-1); adJust := @Integer(hitNum/12); endDate := @Text(@Adjust([01/01/1900];0;0;adJust;0;0;0);"D0S0"); numRange := @Explode(@TextToTime("01/01/1900 - " + endDate)); numList := (@TextToTime(numRange) - [01/01/1900]) / 86400; textList1 := numList+1; @If(TotalHits > 12;"<font class=\"Linha03\">Páginas de resultado: </font>" + @If(TotalHits<(Start*textList1);"<font color=\"006799\"><<</font> "+pageString + @Text(Start-12) + "&count=12&Pchave="+CurrentQuery+"\">" + "Previous" + "</a>&nbsp;&nbsp;";"");"&nbsp;")

    the second computed value, which one is responsable for generating the pages, and the one u must update the code :

    view := @ViewTitle; QUERY_STRING_DECODED := @ReplaceSubstring(QUERY_STRING_DECODED;"agent";""); vTemp := @TextToNumber( @Left(@Right(QUERY_STRING_DECODED;"&start=");"&count=") ); vPagAtual := @If(@Contains(QUERY_STRING_DECODED;"&");((vTemp-1)/12) + 1;1);

    vQueryString:=@If(@Contains(QUERY_STRING_DECODED;"&Pchave");QUERY_STRING_DECODED ;"Open&view="+baseview+"&start=1&count=12&Pchave="+currentquery);

    vTeste := "<a class = Pag href=\"getViews?"+vQueryString+"\">" + @Trim(@Text(vPagAtual)) + "</a>"; vNovoLink := "<font color=\"red\">" + @Trim(@Text(vPagAtual)) + "</font>";

    pageString := "<a class = Pag href=\"getViews?Open&view="+baseview+"&start="; hitNum := @If(TotalHits > 250;250;TotalHits-1); deslocate:= @if(start>(12*21);@Integer((start-(12*21))/12)+1;0); adJust := @Integer(hitNum/12); endDate := @Text(@Adjust([01/01/1900];0;0;adJust;0;0;0);"D0S0"); numRange := @Explode(@TextToTime("01/01/1900 - " + endDate)); numList := ((@TextToTime(numRange) - [01/01/1900]) / 86400) + deslocamento; textList1 := @Text(numList+1); textList12 := @Text(numList * 12+1); repl := pageString + @Text(Start) + "&count=12\">" + @Text(1+Start/12) + "</a>"; with := "<b>" + @Text(1+Start/12) + "</b>";

    vLinks := @Replace(pageString + textList12 + "&count=12&Pchave="+CurrentQuery+"\">"+ textList1+"</a>"; repl; with);

    vFinal := @ReplaceSubstring(vLinks;vTeste;vNovoLink);

    @If(TotalHits > 12;@Implode(vFinal ;"&nbsp;&nbsp;") ;"&nbsp;")

    here is the difference to this post´s code:

    deslocate:= @if(start>(12*21);@Integer((start-(12*21))/12)+1;0);

    numList := ((@TextToTime(numRange) - [01/01/1900]) / 86400) + deslocate;

    Can you see what i´ve thought?

    and the third computed value is ( keep its code):

    view = @ViewTitle; pageString := "<a class = Pag href=\"" + view + "?SearchView&Query=" + Query + "&start="; @If(TotalHits > 12;@If(TotalHits>=Start+hits;"&nbsp;&nbsp;" + pageString + @Text(Start+12) + "&count=12&Pchave="+CurrentQuery+"\">"+"Next" + "</a>"+"<font color=\"006799\"> >></font>";"");"&nbsp;")

    now, if you have more than 250 results, As example you have 12 hits per page.. it will work like:

    1 2 3 4 5 .... 21 Next>>

    if you click "21" and then Next>> again it will look like:

    2 3 4 5 6...... 22 Next>> 3 4 5 6 7 ..... 23 Next>> 4 5 6 7 8 ..... 24 Next>>

    I hope my post can help somebody with the same problem!!!

    voila!

    Fernando Ferrandini - Junior Lotus Developer.

    1. Re: Paging more than 250 docs, PRETTY COOL!

      sorry ... at the second computed value

      the variable is deslocate

      and its use in "numList" is "deslocamento", just change it to "deslocate" and voila!

      sorry.

      • avatar
      • Jake Howlett
      • Wed 27 Sep 2006

      Re: Paging more than 250 docs, PRETTY COOL!

      Thanks Fernando. nice work.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:



Navigate other articles in the category "Miscellaneous"

« Previous Article Next Article »
Redefining the look of HTML   Hiding attachments (without noscript tag!)

About This Article

Author: Jake Howlett
Category: Miscellaneous
Hat Tip: Chris Thorpe
Keywords: search; results;

Attachments

forgetmenot.zip (120 Kbytes)

Options

Feedback
Print Friendly

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »