
October 19th, 2006
11:30 PM
Someone once said...
Status: Offline!
Editable Select Menu
I'm working on a form for a client that I'm trying to make as painless to use as possible. One thing I'm trying to add is an editable select function. What it will be used for is selecting cities that job sites are in, instead of making them add the city manually or just have an input box i would like them to be able to type in a new city and have it automatically saved to the select box for future use. So far I have found several scripts that allow them to be editable but none that will save the new option for use later. If anyone knows of a javascript I can use for this or can help me in creating one I would greatly appreciate it. Thanks.

October 20th, 2006
02:08 AM
I need a haircut
Status: Offline!
'Saving' is the keyword that steps outside of the powers of JavaScript. What you need is a PHP script that would take your client's input and save it somewhere to be pulled up later (with a pinch of JavaScript hocus-pocus).
Take your request to Server Side; I'd move this thread but I have no mod powers :[ I'd also recommend posting a link to the editable script you found, so that they can take it and build on it.
Best of luck with it!
___________________
Jon Culver Chia Pets

October 28th, 2006
06:39 PM
Neverside Newbie
Status: Offline!
Read up on cookies; If you really want to just use client-side scripts, cookies can prove your problem.
Though it's a less-than-elegant way of doing so.

October 30th, 2006
10:25 PM
design rockstar
Status: Offline!
cookies (or sessions, though they weren't mentioned) aren't very practical for something like this. if the user clears their cookies, all saved info is gone. if they log in from a different computer, all saved data is gone (it'll be access a fresh/different cookie).
what happens to the current info after the user fills out the form? is the data saved somewhere already? IE a database? ideally you'd just save the info out to another source IE a table in the db just for the cities, and when your form loads, you just have it loop through all the city table entries.
you could do the same thing witha text file, but it's not as nice as the db.