Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I want to make a web-page that will have several controls elements, among which there are elements like check-boxes, radio-buttons, "range selectors" (one can specify the min and max value, like it is done when you select range for prices in the online markets). The new values shall be sent to the "server-side", once changed (without any Submit buttons etc), and the "server-side" can return something (one or more numbers, etc).

Does anyone know a good ajax-like framework that allows (with minimal adaptation / changes) to make such solution in an easy way? It will be good if the server-side of existing solution will be in Perl (not a big deal, but I know it much better than PHP or something else). Set of controls might change and depend on other parameter, so adding one extra element should not cause rewriting the whole thing.

P.S.: I haven't working in this area for quite a while, so not aware of existing solutions in this area, and don't want to invent the wheel and write everything from scratch for something that already exist (at least, I hope so).

Thanks in advance!

share|improve this question

1 Answer 1

you have so many options here there is no good place to start.

If you want to keep it extremely simple then use Jquery for the front end (html, ajax calls), and have it post data to a script (what you call server-side). The script can be, php, asp, cold-fusion, perl, python, or whatever else you want to code in.

To make the values save on edit, you bind each control (radio, select, etc) to an onchange event that fires the ajax update. Again so many ways to do this.

share|improve this answer
    
Thanks, I will look into Jquery then. It is clear that script can be written even in UNIX shell, and what I'm particularly interesting in is the existing solutions in that area, so there is no need to write such scripts from scratch. By "solution" I mean, for example, kind of JavaScript library (like the one you mentioned) + Perl Module + template of web-page - in other words, all at once, where adding of element on the page require just small changes (or not at all) in other parts. –  Carrier Jul 15 '12 at 3:38
    
I dont think Unix shell scripts translate to server side scripts well. you can run shell scripts through PHP, but its usually not necssary for what you are trying to do. Your easiest and most popular bet is Jquery on the front (javascript / ajax), and php on the back. Store the settings to MySQL. –  Frank Jul 15 '12 at 7:19
    
The new elaborate ways of doing this are local storage, and even sockets to communicate the data back and forth, but not 100% supported and for something as simple as you are trying to pull off its a bit overkill and requires fallback code to support al browsers –  Frank Jul 15 '12 at 7:20
    
I've looked through other similar engines, and likely will use jQuery, as you suggested. Thanks! –  Carrier Jul 16 '12 at 11:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.