Hey guys,
Has anybody implemented a search bar in the actual software product being documented that opens your help and lands the user on the search results?
There's in-documentation search capabilities, but what about searching an online Flare manual from a different start point? Any developers know of a code snipped that would do this?
I'm picturing my user in the software, and there's a search bar somewhere in the software interface where they can type a question and it opens up an internet browser straight to the Flare manual's search results.
Thanks!
Shannon
Adding a Flare Search Bar to the Software
-
GregStenhouse
- Sr. Propeller Head
- Posts: 330
- Joined: Tue May 13, 2008 3:27 pm
- Location: Christchurch, New Zealand
Re: Adding a Flare Search Bar to the Software
It looks like (for HTML5 output, no sure about others) the search URL is #search followed by a dash and then the search query. So I imagine it would't be too hard to have a box in the software that captures the input (e.g. "my search query") then crafts a link like:
https://myserver/help/search-my%20search%20query
https://myserver/help/search-my%20search%20query
Re: Adding a Flare Search Bar to the Software
Yes, I have a search box for the help in our application.mymojo wrote:Has anybody implemented a search bar in the actual software product being documented that opens your help and lands the user on the search results?
There's in-documentation search capabilities, but what about searching an online Flare manual from a different start point? Any developers know of a code snipped that would do this?
HTML in master page:
Code: Select all
<form name="help-search" id="help-search-form" class="clearfix">
<input type="search" id="help-search-input" name="helpSearchInput" placeholder="Search our help" autocomplete="on" form="help-search-form" />
<button type="submit" id="help-search-button">Search</button>
</form>Code: Select all
$(document).ready(function() {
/* handle help search box submit */
$( "#help-search-form" ).submit(function(event) {
event.preventDefault(); /* prevent default action, so doesn't refresh */
var searchFor = $('#help-search-input').val(); /* get value in input box */
var searchurl = 'http://yourwebsite.com/yourhelp/default.htm#search-' + searchFor; /* build URL */
window.open(searchurl, "_blank"); /* open results in new window */
$('#help-search-input').val(''); /* clear input box */
});
});Code: Select all
http://yourwebsite.com/yourhelp/default.htm#search-<search term>