Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Old 08-12-2004, 04:29 AM Searching
Spud In Disguise's Avatar
Super Spam Talker

Posts: 808
Location: UK... where else?
Trades: 0
Hello there. I am looking for a javascript search engine that will let me manually enter my keywords and result pages. I already have one which looks like this:

-------------------

// Keyword[0] = n (where n is the number of keywords which can be searched
Keyword[0] = 6

// Each entry is split into
// Keyword[n] = text (where text is the keyword of which the entry is to
// be searched by (type Keywords in lowercase)
// Descrip[n] = text (where text is the description associated to this entry
// Address[n] = text (where text is the URL associated to the entry
// n is the entry number.

Keyword[1] = "bouncy castle hire,bouncy castle"
Descrip[1] = "Bouncy castle hire"
Address[1] = "b_b_bouncy_castle_hire.htm"


function checkDatabase() {

var Found = false
var Item = document.forms[0].searchfor.value.toLowerCase();

stats='toolbar=no,location=no,directories=no,statu s=no,menubar=no,height=300,width=300,'
stats += 'scrollbars=yes,resizable=yes'
MsgBox = window.open ("","msgWindow",stats)
MsgBox.opener = window;
MsgBox.opener.name = "opener";
MsgBox.document.write("<head><title>Search Results</title></head>");
MsgBox.document.write ("<body bgcolor=white text=black link=blue vlink=darkblue alink=blue><H2><CENTER><font face=arial>Search Results</CENTER></H2>")
MsgBox.document.write ("<font size=3><b><center>For the keyword: "+Item+"</center><hr width=50%></b></font>");
for (var i=1; i <= Keyword[0]; i++) {
if(Item == Keyword[i]) {
Found = true;
MsgBox.document.write ("<li><font face=arial><font size=2><b>"+Descrip[i]+"<BR><A HREF="+Address[i]+" target='opener'>Click Here To Go There</A></font></font>")

}
}
if(!Found)
MsgBox.document.write ("<H4>Nothing Found</H4>")
// Leave the line below intact if you want to legally use this script
MsgBox.document.write ("<FORM><CENTER>")
MsgBox.document.write ("<font size=2><font color=arial><INPUT type='button' value='Close' onClick = 'self.close()'></font></font>")
MsgBox.document.write ("</CENTER></FORM>")
MsgBox.document.write ("<H6><small><small><small><b></b><font color=white><font face=arial><font size=1><font color=black>Originally created by Adam Allen <br>© 1997 All Rights Reserved</font></font></small></small></small>")
// There must be my notice above if you are to use this script legally.
// It took many hours work, fairs is fair, I just want that little line in
// and you get a fully working Search ENGINE, for FREE, on your site
// In Java Scripts as well, and not crap JAVA!
// Also a copyright notice MUST appear with the form.
}
// -->

</script> </font><a
href="http://www.javafile.com/javascripts/search/search3.zip"><font size="3">Download the
Script</font></a><font FACE="ARIEL,HELVETICA" SIZE="-1"></p>
<form NAME="form1">
<b><div align="center"><center><p>Search for:</b><br>
<input TYPE="text" NAME="searchfor" VALUE="JavaScript" SIZE="20"><b><input type="button"
value="Search" align="absmiddle" onClick="checkDatabase()"></b><br>
<br>
<font face="Arial" size="2">To test this search engine, search for <strong>'JavaScript'</strong>.</font></font>
</p>
</center></div>
</form>


--------------------------------


but it only lets me use one keyword per entry, meaning I canot put multiple keywords for the same result.

Does anyone know how I can change this or where I can find a better one?
__________________

Please login or register to view this content. Registration is FREE
- Fansite

Please login or register to view this content. Registration is FREE
- Blog
Spud In Disguise is offline
Reply With Quote
View Public Profile Visit Spud In Disguise's homepage!
 
 
Register now for full access!
Old 08-12-2004, 08:20 AM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
Have you checked out the libraries at hotscripts.com -- they have a seemingly endless number of scripts for download. Also check out dynamicdrive.com.
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 08-12-2004, 10:41 AM
Skilled Talker

Posts: 63
Trades: 0
what does this script do? search for keywords in a given page? this is not what they usually call a search engine, though. this script will not search all pages of your site to find those that contain a specific word. do you need search engine functionality or you want to make this script work?
antoshka is offline
Reply With Quote
View Public Profile Visit antoshka's homepage!
 
Old 08-12-2004, 04:12 PM
Spud In Disguise's Avatar
Super Spam Talker

Posts: 808
Location: UK... where else?
Trades: 0
I know it's not a proper search engine, actually can anyone suggest any better ones than this, that are free? And I can only host CGI scripts, and I'm not too good at it. Please help, cheers.
__________________

Please login or register to view this content. Registration is FREE
- Fansite

Please login or register to view this content. Registration is FREE
- Blog
Spud In Disguise is offline
Reply With Quote
View Public Profile Visit Spud In Disguise's homepage!
 
Old 08-12-2004, 04:31 PM
Republikin's Avatar
Defies a Status

Posts: 3,189
Trades: 3
http://www.xav.com/scripts/search/

I highly recomend this script.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Republikin is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Searching
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28761 seconds with 12 queries