utmore.wbb - Create "More Records" Information, Either as a URL or as Hidden Form Tags


CALL "utmore.wbb",cgi$, flds$, moreurl$, morehidden$


When developing record scrolling applications, it may be necessary to provide a link or button to a subsequent set of records through a "more records" link. Often, this type of link only requires one or two fields to be passed to the subsequent task. This information can be easily created manually in Business BASIC code. However, if many fields of information passed to the current task must be passed on to subsequent tasks, this routine can simplify the task of creating the HTML text required.




String template generated by utcgi.wbb.


Optional comma-separated list of field names. If specified, only the field names specified are used to generate moreurl$ and morehidden$ from cgi$. If flds$ begins with "!,", then all fields in the template, except those listed after the first comma, are included in the generated document.


Returned as a text string that contains URL-encoded field=value pairs from the values stored in cgi$. For example, if cgi.state$="CA" and cgi.slsp$="100", then moreurl$ would contain "state=CA&slsp=100". This can then be appended to the end of a cgi link URL, such as "/cgi-bin/listrecs?state=CA&slsp=100".


Returned as a set of hidden field input tags, for inclusion in a HTML form. The example given above in moreurl$ would produce the following text:

<input type="hidden" name="state" value="CA">
<input type="hidden" name="slsp" value="100">

This can then be embedded in an HTML form, along with a submit button, to provide another version of a link to a subsequent list.

This routine is sensitive to the presence of two cgi$ variables, "bbweb_count" and "bbweb_skip". If bbweb_count is present, bbweb_skip is automatically incremented by the value of bbweb_count when added to moreurl$ and morehidden$.