الكود يعمل ولا مشكلة فيه , والمشكلة بالنسبة لي أن البحث يتنفذ وتظهر النتيجة بنفس الصفحة أثناء كتابة نص البحث
وما أريد ان يتنفذ البحث بعد الضغط على Button وتكون النتيجة في صفحة مستقلة
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script src="http://www.google.com/uds/api?file=uds.js&v=1.0&key=ABQIAAAAbKU1_TiGJxAPxQNRN0Z7thQEKx5ztgmPnP8AiUB_ZtaZmH_j4xR_bAGbjyG4
GamffxBhkZcRXMQE0A" type="text/javascript"></script>
<script type="text/javascript">
var searchControl;
window.onload = function() {
onLoad();
}
function onLoad() {
searchControl = new GSearchControl();
// add a regular web search, with a custom label 'web'
//var webSrearch = new GwebSearch();
//webSrearch.setUserDefinedLabel("web");
//searchControl.addSearcher(webSrearch);
// add a site-limited web search, with a custom label
var siteSearch = new GwebSearch();
siteSearch.setUserDefinedLabel("اسم الموقع");
siteSearch.setSiteRestriction("http://www.xyz.sa/");
searchControl.addSearcher(siteSearch);
// add a blog search, with a custom label
//var blogsSrearch = new GblogSearch();
//blogsSrearch.setUserDefinedLabel("weblogs");
//searchControl.addSearcher(blogsSrearch);
// setting the draw mode for the Google search
var drawOptions = new GdrawOptions();
// use tabbed view
drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED);
// set the input field (instead of the default one)
drawOptions.setInput(document.getElementById('query'));
// actually write the needed markup to the page
searchControl.draw(document.getElementById("searchcontrol"), drawOptions);
// set the google logo container
GSearch.getBranding(document.getElementById("branding"));
}
var query = null;
document.onkeydown = function(event) { kd(event); };
function kd(e) {
// make it work on FF and IE
if (!e) e = event;
// use ESC to clear the search results
if (e.keyCode == 27)
searchControl.clearAllResults();
// get the input field
if (query == null)
query = document.getElementById('query');
// and move the focus in there
query.focus();
}
</script>
</asp:Content>
<div id="queryContainer" style="width: 53%" dir="rtl"><input type="text" name="query" id="query" style="width: 147%; direction: rtl; font-family: tahoma;" dir="rtl" /></div>
<div id="searchcontrol" style="width: 78%; direction: rtl; text-align: right; height: 103px;" dir="rtl"></div