logo

New Response

« Return to the main article

You are replying to:

    • avatar
    • Larry Lizzard
    • Posted on Mon 6 Jan 2003

    In Holland we have a saying: standing on the shoulders of giants, even a midget can look further ahead. Standing on the shoulders of giant Jake, I can combine two of his ideas: - a pure html form on any page - the ?CreateDocument url string (see the url cheat sheet on notes.net)

    in any form/page/view/etc: put the following pass-through html:

    {/form}{form action="Return?CreateDocument" method="post" enctype="multipart/form-data"}{input name="searchQuery" type="text" SIZE=45 MAXLENGTH=90 value=""}{input type="button" value="Search" onclick="if ( this.form.searchQuery.value==''){return false;} else {this.form.submit()}" /}

    replace { and } by < and >.

    The above creates a form on your form/page/view/etc with a field called searchQuery and a submit button next to it.

    Create a form "available to Public Access users" called "Return" with two fields: searchQuery (editable, text) and $$Return (computed, text). Make all the required calculations on the searchQuery field in the $$Return field.

    e.g. "[/yourdatabase/yoursearchview?SearchView&Query=" + searchQuery + "&SearchWV=FALSE]"

    (keep square brackets)

    That is it, simple and effective.

    Additional advantages: 1) It gives you the ability to create Google style search queries as described in:

    http://www.codestore.net/A55692/store.nsf/all/339186C51DA90D7E86256B5E007A7991?O penDocument

    2) It also gives you the opportunity to create view with all the saved "Return" forms to see what people are searching for.

    3) Also, the pass-through-html form submits on enter when the cursor is in seachQuery field.

    4) It easily combines with other html forms on the same page.

    Thank you Jake for your more than superb site. Visit it daily, couldn't sleep for two weeks while you were on holiday.

Your Comments

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