You say that you can't use a form element on your search page. Instead, put event handlers on the input and button elements. I'll start with Jeff's example:
http://ajax-apis.appspot.com/two-page-search Editing your copy of that page, delete the <form...> and </form> tags. Add an onkeydown event handler to the input element, and an onclick event handler on the button element. <input name="q" size="50" id="query-input" onfocus="inputFocus();" onblur="inputBlur();" onkeydown="if (event.keyCode == 13) window.location = 'http://ajax- apis.appspot.com/html/two_page_search_results.html?q=' + event.target.value;" > <button type="submit" onclick="window.location = 'http://ajax-apis.appspot.com/html/ two_page_search_results.html?q=' + document.getElementById('query- input').value;" >Search</button> (This quick example uses Jeff's results page for testing. Of course, change the URL in the onkeydown and onclick event handlers, to specify your own results page.) Jeff's code specified UTF-8 in the accept-charset attribute on the form. Since you're not using a form, I would suggest that you specify UTF-8 with a meta tag (in the head section): <meta http-equiv="content-type" content="text/html; charset=utf-8"> -- omr -- You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-ajax-search-api?hl=en.
