javascript - How can I create a loop in an onClick event? -


i want write onclick event submits form several times, iterating through selected items in multi-select field, submitting once each.

how code loop?

i'm working in ruby on rails , using remote_function() generate javascript ajax call.

my quick answer (as i've not coded yet) create function creates post using xmlhttprequest , specific parameters single call. inside onclick() handler call function loop through selected items.

i suggest proof of concept using dummy html page , javascript , try figure out how work in ror.

also, why attempting make multiple calls browser opposed handling looping conditions in ror controller?


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -