genchacker
Crown Elektronik
   
Mesajlar: 150
Katılma Tarihi: Jul 2008
Rep Puanı: 0
|
Ajax Search Eklentisi - Ajax Destekli Arama
AJAX Quick Search
http://de3.oscommerce.com/contributions/...chv1.1.zip
Mutlaka Yedek Alın
1. quickfind.php Dosyasını Sitenizin Ana dizinine Kopyalayınız.
2. catalog/advanced_search.php Dosyasını Açın
bunu Bulun (Satır #27):
Kod:
<script language="javascript"><!--
Buldugunuz Satırdan Sonra Aşağıdakini ekleyiniz
Kod:
var req;
function loadXMLDoc(key) {
var url="quickfind.php?osCsid=<?php echo tep_session_id();?>&keywords="+key;
// Internet Explorer
try { req = new ActiveXObject("Msxml2.XMLHTTP"); }
catch(e) {
try { req = new ActiveXObject("Microsoft.XMLHTTP"); }
catch(oc) { req = null; }
}
// Mozailla/Safari
if (!req && typeof XMLHttpRequest != "undefined") { req = new XMLHttpRequest(); }
// Call the processChange() function when the page has loaded
if (req != null) {
req.onreadystatechange = processChange;
req.open("GET", url, true);
req.send(null);
}
}
function processChange() {
// The page has loaded and the HTTP status code is 200 OK
if (req.readyState == 4 && req.status == 200) {
// Write the contents of this URL to the searchResult layer
getObject("quicksearch").innerHTML = req.responseText;
}
}
function getObject(name) {
var ns4 = (document.layers) ? true : false;
var w3c = (document.getElementById) ? true : false;
var ie4 = (document.all) ? true : false;
if (ns4) return eval('document.' + name);
if (w3c) return document.getElementById(name);
if (ie4) return eval('document.all.' + name);
return false;
}
window.onload = function() {
getObject("keywords").focus();
}
Bunu Bulun (SAtır# 156-167):
Kod:
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => HEADING_SEARCH_CRITERIA);
new infoBoxHeading($info_box_contents, true, true);
$info_box_contents = array();
$info_box_contents[] = array('text' => tep_draw_input_field('keywords', '', 'style="width: 100%"'));
$info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1') . ' ' . TEXT_SEARCH_IN_DESCRIPTION);
new infoBox($info_box_contents);
?>
Bununla Değiştirin:
Kod:
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => HEADING_SEARCH_CRITERIA);
new infoBoxHeading($info_box_contents, true, true);
$info_box_contents = array();
$info_box_contents[] = array('text' => tep_draw_input_field('keywords', '', 'id="keywords" onKeyUp="loadXMLDoc(this.value)" autocomplete="off" style="width: 100%"'));
$info_box_contents[] = array('text' => '<div style="display: block; margin-left: 0%; width:100%; float: left;border:solid 1px;background-color:#CCCCCC;" id="quicksearch">Quick Find Results....</div>');
$info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1') . ' ' . TEXT_SEARCH_IN_DESCRIPTION);
new infoBox($info_box_contents);
?>
İşte Bu Kadar 
Takıldıgınız Yer Olursa Yardımcı oLmaya cALısayım
(Bu Mesaj 15-10-2008 14:35 değiştirilmiştir. Değiştiren : genchacker.)
|
|
| 15-10-2008 14:30 |
|
Dizemen
Senior Member
     
Mesajlar: 224
Katılma Tarihi: Jul 2008
Rep Puanı: 1
|
RE: Ajax Search Eklentisi - Ajax Destekli Arama
Ekledim gayet güzel çalıştı ancak
Şunu değiştirebilirseniz daha iyi olabilir.
Kod:
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => HEADING_SEARCH_CRITERIA);
new infoBoxHeading($info_box_contents, true, true);
$info_box_contents = array();
$info_box_contents[] = array('text' => tep_draw_input_field('keywords', '', 'id="keywords" onKeyUp="loadXMLDoc(this.value)" autocomplete="off" style="width: 100%"'));
$info_box_contents[] = array('text' => '<div style="display: block; margin-left: 0%; width:100%; float: left;border:solid 1px;background-color:#CCCCCC;" id="quicksearch">Quick Find Results....</div>');
$info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1') . ' ' . TEXT_SEARCH_IN_DESCRIPTION);
new infoBox($info_box_contents);
?>
bununla değiştirin.
Kod:
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => HEADING_SEARCH_CRITERIA);
new infoBoxHeading($info_box_contents, true, true);
$info_box_contents = array();
$info_box_contents[] = array('text' => tep_draw_input_field('keywords', '', 'id="keywords" onKeyUp="loadXMLDoc(this.value)" autocomplete="off" style="width: 100%"'));
$info_box_contents[] = array('text' => '<div style="display: block; margin-left: 0%; width:100%; float: left;border:solid 1px;background-color:#CCCCCC;" id="quicksearch">Hızlı Arama Sonuçları....</div>');
$info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1') . ' ' . TEXT_SEARCH_IN_DESCRIPTION);
new infoBox($info_box_contents);
?>
|
|
| 15-10-2008 14:49 |
|
genchacker
Crown Elektronik
   
Mesajlar: 150
Katılma Tarihi: Jul 2008
Rep Puanı: 0
|
RE: Ajax Search Eklentisi - Ajax Destekli Arama
|
|
| 16-10-2008 08:46 |
|