hi>>
i am work in project with asp.net
i have code that search words in only one page ,but i want simple code for search words in multiple pages
i mean i want put search box in home page and i can search for words in all pages
please help me and dont late...');" title="Sad -
">
.....
thanks
can u give us more information about how ur information is stored in your website
so we can help u decide which search mechanism to use?
cuz search can be done in a million ways
do you want to be able to search each page, or search every page with 1 click
The solution varies based on what you want to search and how the data is stored. You can use the Google Ajax Search API to search your site.
http://www.josephguadagno.net/Articles/1/Technical-Articles/3/How-to-use-the-Google-AJAX-Search-API-on-your-web-site.aspx
hi...
i want to add search box in home page only, then if i write in this box any word ,it can search in home page and all other pages
all pages have just text information
thanks..........
Thank can be done with the Google API
hi>>>>>>>>>>>>
please i want simple code of html or java script or asp.net to make search in side my website with out using google
i want to add search box in home page only, then if i write in this boxany word ,it can search in home page and all other pages and return
the result>>>>>>
thank
Then you will need something that can index your web site. Microsoft Indexing service would work if you have installed. Otherwise, you are going to have to build a "database" or "index" of all of your content files or database entries and query against that.
hi
i found this script to search any word in one page can i find other code for search of word in all pages?
my website offline
<script language="JavaScript" type ="text/javascript"
var NS4 = (document.layers); // Which browser?
var IE4 = (document.all);
var win = window; // window to search.
var n= 0;
function findInPage(str) {
var txt, i, found;
if (str == "")
return false;
if (NS4) {
if (!win.find(str))
while(win.find(str, false, true))
n++;
else
n++;
if (n == 0)
alert("Not found.");
}
if (IE4) {
txt = win.document.body.createTextRange();
for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
txt.moveStart("character", 1);
txt.moveEnd("textedit");
}
if (found) {
txt.moveStart("character", -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();
n++;
}
else {
if (n > 0) {
n = 0;
findInPage(str);
}
else
alert("Not found.");
}
}
return false;
}
</script>
Again, refer to the previous post.
i am really sorry but it doesn't work this way u have to decide a way for organizing ur information in a better way than just pages so it can be searched
best we can do is to create keywords for every page and search these pages if that would work for u
i can show u a sample script in js that can do that
0 comments:
Post a Comment