Add a Search Box to Landing Page

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
MinnesotaCory
Propeller Head
Posts: 30
Joined: Tue Jan 25, 2011 3:40 pm
Location: Marshall, MN

Add a Search Box to Landing Page

Post by MinnesotaCory »

I have the navigation bar hidden by default on my landing page for aesthetic reasons, but I would like to place a search box somewhere on my landing page so that my users can search the help system without having to click first. Search is the default accordion pane when navigation is opened. I've searched the flare manual and this forum and haven't found a way to add a search box outside of the accordion pane. Is there a way to do this with javascript? If adding the search box is impossible, can I add a link labeled "Search" that will open the navigation pane?
Thanks,
CK
If you plan to communicate you must prepare to be misunderstood or ignored.
whunter
Sr. Propeller Head
Posts: 429
Joined: Thu Mar 12, 2009 4:49 pm
Location: Portland, OR

Re: Add a Search Box to Landing Page

Post by whunter »

I used the information in this thread to add a search box to the home page:

http://forums.madcapsoftware.com/viewto ... bed+search
MinnesotaCory
Propeller Head
Posts: 30
Joined: Tue Jan 25, 2011 3:40 pm
Location: Marshall, MN

Re: Add a Search Box to Landing Page

Post by MinnesotaCory »

Perfect! Awesome! Thanks!
Sorry, I didn't find it because the search term "Embed" just didn't cross my mind.
Now I just need to modify the code to make the navigation bar display after the "Search" button is pressed.
-CK
If you plan to communicate you must prepare to be misunderstood or ignored.
MinnesotaCory
Propeller Head
Posts: 30
Joined: Tue Jan 25, 2011 3:40 pm
Location: Marshall, MN

Re: Add a Search Box to Landing Page

Post by MinnesotaCory »

Ok, so I can get the search box and submit button to appear. They function normally, but the search results are still hidden in the navigation panel. I found a javascript call to open the navigation panel but I don't know exactly where to put it. I tried a workaround with a "Show Results" link, but that call caused errors on the page. I'm sure this is simple, but I've tried putting this code in a few different places to no avail.

Code: Select all

		<script type="text/javascript">
							function searchHelp(url)
							{
							var searchurl = '../Default_CSH.htm?' + url;
							window.parent.location = searchurl;
							}
						</script>
						<FORM name="search" onsubmit="searchHelp(searchtext.value);">
							<INPUT type="text" name="searchtext" />
							<INPUT type="submit" value="Search" />
						</FORM>
						<p><a href="javascript:void(0);" title="show/hide navigation pane" onclick="MCGlobals.RootFrame.ShowHideNavigation(true);" class="white">Show Results</a></p> -->
					
The page always reloads when the form is submitted, and never loads with navigation open due to my setting in the skin. Is there any way to override this after the search form is activated?
TIA
-CK
If you plan to communicate you must prepare to be misunderstood or ignored.
NorthEast
Master Propellus Maximus
Posts: 6375
Joined: Mon Mar 05, 2007 8:33 am

Re: Add a Search Box to Landing Page

Post by NorthEast »

Create a second skin which does display the navigation bar; and use that skin in your CSH link.
Post Reply