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

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

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -