Results 1 to 3 of 3

Thread: Need to modify your "google internal search script" to work on a collection of files

  1. #1
    Join Date
    Aug 2015
    Thanked 0 Times in 0 Posts

    Default Need to modify your "google internal search script" to work on a collection of files


    I have a collection of files that have been shadowed to several world wide locations. Every location has a different subset of files.
    It is not a web server.
    At these remote sites, the user would like to search through their entire file directory (html files) for key terms - e.g. "Error Code : 3006" and be able to identify which html files contain the search term. I am restricted from using shareware etc. .

    I'm hoping that the script " Google Internal Site Search script- By (" will work for me.

    My problem is the URL.

    I modified the script like so (not all script info shown):

    Click image for larger version. 

Name:	javascript-googlesearch1.JPG 
Views:	1250 
Size:	83.2 KB 
ID:	5715

    And the result is:
    Click image for larger version. 

Name:	javascript-googlesearch2.JPG 
Views:	183 
Size:	41.1 KB 
ID:	5716

    If I remove the word "site:" from the code, I get a NaN response - I'm guessing the forward slashes aren't being interpreted correctly.
    "function Gsitesearch(curobj){
    curobj.q.value="site:"+YourDomain_proper+" "+curobj.qfront.value

    Even though I have little-to-no knowledge of javascript, I have been tasked with coming up with a search tool for this private site, and I am not a programmer. But it is what it is and I am trying to make the best of it by smashing pieces of code together. Perhaps this isn't even the best way to go?
    If this is an easy fix, please let me know. If you think this is not an appropriate tool and can suggest something else, I would be all ears.

    Please be gentle.

  2. #2
    Join Date
    Jul 2008
    Derbyshire, UK
    Thanked 599 Times in 575 Posts
    Blog Entries


    I'm not sure what Google search script you're referring to in the JavaScriptKit site but a Google "site:" search is a standard function that is run through Google. It is the equivalent of manually going to Google and punching in " site: " - that's going to pull up all the pages for "". The script will be acting as an intermediary and passing a keyword to this Google "site:" search, but once it does that, it's out in the wild; on the live web and at the mercy of Google's stored data (and whatever it wants to spit back as the result).

    So, first prerequisite is that you are connected to the Internet and able to access Google (no firewalls or filters blocking access).

    The second prerequisite is that the "site:" operator must be present for Google to recognise the search as being from the specified website (only results from "" rather than the whole web). Removing it from the script will kill the search.

    The third prerequisite is that your website is on the live web and already indexed by Google. You say that your site is not (on) a web server so is it running locally? If so, this unfortunately isn't going to be the script for you.

    Usually, a search engine script would require a server and database to run, but I know of a flat file script that you can hardcode search terms in to. It's called Tipue. I'm going back about 10 years now, but I used a really old version in a desktop "website" that several people accessed from a local network - sounds a bit like your situation. The developers went quiet for a few years but it looks like an updated version is now released. I haven't explored the updates but the website says this;
    Static mode can be used without a web server, and without an internet connection if you load jQuery locally.

    The documentation is very good so you should hopefully be able to get at working OK.

    The downside is that all your keywords (search terms) will need to be pre-empted and hard coded into a file. From memory, it was an array where, for each page/file, you define a title that displays in the results page, a series of important keywords that will flag each page/file, and a relative path link/reference to each page/file so that it will launch when a search result is clicked.

    Hope that helps
    Last edited by Beverleyh; 08-19-2015 at 07:40 PM. Reason: More info
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    Aug 2015
    Thanked 0 Times in 0 Posts

    Default Thanks Bev

    Hello Bev:

    Thank you for your quick response and a possible alternate solution. Appreciate it !

Similar Threads

  1. Replies: 7
    Last Post: 02-01-2014, 02:12 AM
  2. Google search being too "helpful"
    By djr33 in forum Computer hardware and software
    Replies: 7
    Last Post: 04-05-2013, 12:51 PM
  3. Replies: 0
    Last Post: 05-17-2009, 12:43 PM
  4. Need help with iframe and "google Free search"
    By javierpindter in forum JavaScript
    Replies: 0
    Last Post: 07-26-2006, 07:12 PM
  5. Attempting to modify "DHTML Slide Show Script"
    By norm04 in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 09-11-2005, 06:51 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts