With launch of Google Custom Search Engine themes let you select from a set of result styles, as well as decide on layout for the search box and search results. One of major advantages of Ajax style search box is that users can perform their queries & results without leaving the page. Ajax search library supports "two-page" use case as well. To create this we wrote a simple form in HTML and added JavaScript to add the "Google Custom Search" branding in the search box. When user submits the form, they’re taken to a results page with following HTML structure: <div id="results">Loading...</div>. And the search page with following structure:
<div style="width:500px; margin:auto; margin-top:100px;">
<form action="/html/two_page_search_results.html" method="GET">
<input name="q" size="50" id="query-input" onfocus="inputFocus();" onblur="inputBlur();" />
<button type="submit">Search</button>
</form>

Recommend this story
Email Newsletter
Missing out on the latest diTii.com news? Enter your email below to receive future announcements direct to your inbox. An email confirmation will be sent before your subscription is activated - please check your spam folder if you don't receive this.
About the AuthorDG