PDA

View Full Version : in page search


cheesey30
05-07-2010, 11:19 AM
Hi all, please bear with me as I am new to DW and not much of a coder. I would like to to produce a box feature on a page which search that page for text on submit as in the Ctrl+F button.
I'm guessing it's probably javascript or perl etc but I was wondering if there was a way to do it in DW.

Thanks in advance

davidj
05-14-2010, 11:44 AM
you can add a search using Googles own code API

http://www.google.com/cse/

DWcourse
05-14-2010, 12:53 PM
Don't all browsers already have a page search function (control+f) built in (mine do)? Why duplicate it?

cheesey30
05-14-2010, 07:36 PM
Thanks davidj, i have looked at Google's option but as i am more of a designer than coder i have struggled to manipulate the code/script to work on a specific page in my site.

DW ... yes they do but i am attempting to teach viewers who probably have never heard of Ctrl+F.
Basically what i need is a search for text box which highlights and jumps to the particular word or string (javascript lingo i think) due to the fact that a large number of users who may visit my site are not be computer literate and would be confused by Ctrl+F.
I would like a 'search this site' box for a specific page.
Please excuse my ignorance, but having only just migrated from (sorry for the foul language here) frontpage (quick ... run away ... another idiot) i was just wondering if DW had something which would do this.
I realise, obviously not. But i was hoping some kind person may know of a simple way around this (ie a js script which works cross browser).
Thank myou very much for your input guys

Cheesey

DWcourse
05-14-2010, 08:07 PM
Try http://www.javascripter.net/faq/searchin.htm

cheesey30
05-14-2010, 08:47 PM
Thanx DWcourse. Ive tried that script but it does not seem to work in the latest version of Firefox. It works fine in IE6 and later but FF refuses to do anything with it. I have been searching for ages but to no avail. I was sort of hoping there may be a simple way in DW (ie ... like altering the jump to form code), but i realise thats not an option.
I guess im gonna have to put a very large piece of text on my site stating "IF YOU WANT TO FIND ANYTHING ... USE Ctrl+F ... PLEEEEEEEEEZE"
Joking apart, I do realise that I should probably be asking on some kind of scripting/coding forum, but as I am keen to learn DW I thought that this would be a good place to start.

Thanks very much for your input and help and if I can help out in any way I will be more than happy to do so.

Nik