Hi all;

I'm just looking for any suggestions before I do my over override of 
hobo_ajax_response.

On a page, I have a <DIV> element that gets updated by a web_method. I'd 
like to trigger a javascript function when the content of that DIV changes. 
a DIV element doesn't support a built-in changed event, but I can bind my 
own and then trigger it when needed:

$('#div-image-controls').bind('contentchanged', function() {
  // do something when the div content has changed
});

>From my web_method, I need to trigger this 'contentchanged' event at the 
time that hobo_ajax_response is being prepared. 

I thought about passing my own JS to hobo_ajax_response and simply tacking 
it onto the 'page' string created by hobo_ajax_response:

     /hobo/lib/hobo/controller.rb:96
  page << "#{function}(#{dom_id.to_json}, #{part_content.to_json})\n"

This isn't optimal, since it means I have javascript code within my 
controller's web_method, and I'm overriding a core Hobo method. 

Is there an easier way that I can't see?

Many thanks,
Tim


-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to