ruby on rails - Synchronous update of form data -
this simple question, haven't found answer here or google.
we have ruby on rails app form needs update section when user changes selected option in pulldown menu. complication update database - can't realistically store , hide possible data when loads. obvious solution ajax call, problem ajax asynchronous, , our update inherently synchronous. need ensure user gets updated info before submitting or doing other work on form.
i know 1 can (but shouldn't) specify ajax call synchronous, there better approach this? hate separate post , reload every time user selects different option in 1 field, i'm not sure best practice situation this.
update: tried switching using xmlhttprequest object in javascript, , may work (i'm figthing rails routing issues right now), gives me warning synchronous option object deprecated. there no accepted way synchronous communication between web page , server?
Comments
Post a Comment