|
I am trying to incorporate DOM storage into an autosuggest (auto complete names in a query form) script project. My task was to modify an available, downloaded script (that works), that uses an array for the names that are suggested as one types succeeding characters. The original package consists of the main form generator – autofill.html and two supporting scripts, autosuggest.js and bindevents.js. The bind events contains the array of names. When run, one can do View Source and see the names in the new Array line of code. That I don’t want.
My mod was to replace the original array of names with one built from a list of names already in DOM Storage (from a previous script). This seems simple and I can prove that it works up to a point. But it seems the minute sessionStorage is introduced into the script the autosuggest.js stops working. The form is still there but no suggestions pop down as a name is typed in.
If I have your interest so far, here’s the purpose. I want an earlier script to build the DOM Storage array using PHP from a MySql DB. That script would then redirect to the autofill script leaving no trace of the names available to view when looking at source..
Since I’m on a Mac I am using beta 3. 5 of FireFox which added DOM storage (not available in the current standard release).
I am not a real experienced js guy but I have boiled the problem down into some demonstrable scripts which I would be happy to post if anyone if interested in taking up this challenge.
I want to give credit to a Joe Kepley for posting the well documented original script somewhere on the web, but I downloaded it so long ago that I can’t find it now.
Last edited by jimandy; 06-07-2009 at 04:52 PM..
Reason: Used wrong words
|