Quick Search Form for HTML5 Output

Here is a quick search form you can use on another page to open an HTML5 output search in the skin. To use it, change the value for uri (third line) to the URL for your Flare HTML5 help system’s main file. Then place the script and markup in the page markup where you want the form to appear on a web page.

<script>
    function open_help_search() {
        var uri = 'http://www.example.com/default.htm';
        var reference = encodeURIComponent(document.getElementsByName('help-search-text')[0].value);
        if (reference != "") {
            reference = '#search-' + reference;
        }

        window.open(uri + reference)
    }
</script>

<form name="help-search-form">
  <input type="text" name="help-search-text" />
  <button type="button" onclick="open_help_search()">Search help</button>
</form>

search-form

search-form-with-term

search-results

1 comment

Leave a Reply to Bob Buckley Cancel reply

Your email address will not be published.

HTML tags are not allowed.

250,812 Spambots Blocked by Simple Comments