hobo_ajax_response with preamble - why the "ajax failed" message?

Skip to first unread message

Tim Griffin

Apr 24, 2017, 10:07:48 PM4/24/17
to Hobo Users
Hi all;

I have a quick question about using a preamble on a call to hobo_ajax_response. 

On a form, I have a <select> which is bound to a javascript function when it changes:


In a controller, I have an unrelated web method that needs trigger this same function call when it's done. So, I thought I'd do this:

  def my_web_method
    hobo_ajax_response( :postamble => js )

While this actually works and does the job, it leaves an "ajax failed" message in the Chrome console. 

Instead, I find I've had to do the following to avoid the "ajax failed" message, but it feels more like a hack:

    # Trigger the change event manually to get updateDocumentFields to fire:
    hobo_ajax_response( :postamble => js )

Anyone have an idea what the origin of the "ajax failed" message would be when I make a direct call to that javascript function instead of via the bound event? 

Any insight would be great.


Reply all
Reply to author
0 new messages