This project is archived and is in readonly mode.

#727 ✓resolved
Niels Meersschaert

Ajax based actions cause js errors with synchronous calls

Reported by Niels Meersschaert | July 30th, 2008 @ 03:18 PM | in 2.x

The docs describe If you for some reason or another need synchronous processing (that‘ll block the browser while the request is happening), you can specify options[:type] = :synchronous.

If I make a call to any helper aka drop_receiving_element with type => :synchronous, the asynchronous is set as expected, but an additional argument type:synchronous is added.

Droppables.add("drop_zone", {onDrop:function(element){new Ajax.Request('/containers/dropped', {asynchronous:false, evalScripts:true, parameters:'id=' + encodeURIComponent(element.id)})}, type:synchronous}

This causes a js error since synchronous isn't defined as a JS variable. Alternate variations of :synchronous => true or :asynchronous => false don't work, although the docs don't say they should anyway.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages