الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

لدي كود بحث داخل موقع وأريد المساعده فيه

بدأه AboMoayad في 31 أغسطس 2008 · 1 رد · 699 مشاهدة · في ASP.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

الكود يعمل ولا مشكلة فيه , والمشكلة بالنسبة لي أن البحث يتنفذ وتظهر النتيجة بنفس الصفحة أثناء كتابة نص البحث

وما أريد ان يتنفذ البحث بعد الضغط على 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

اللهم أطل عمري وأحسن عملي واختم بالشهادة أجلي

#2

تقصد popup dialogue و لا cross-page postback

لو لاولي استخدم java script:window.open ثم مرر القيم في ال query string او يمكنك الوصول الي parent page عن طريق document.opener

لو الثانية : قم بوضع خاصية postBackUrl الخاصة بال button الي الصفحة التي يتم فيها العرض

و من الصفحة الثانية يمكنك الوصول الي الصفحة الاولي عن طريق Page.PreviousPage

و للوصول للكنترولز الخاصة بها استخدم Page.PreviousPage.FindControl

لمزيد من المعلومات

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…