I working on transitioning over to jquery.  I know its still in alpha but I 
figure I mind as well get started since I have a large javascript portion 
to the site that needs rewriting so I'll just redo it in jquery.  I have 
the following on the current site that works however I know is't very 
'Hobo" way of doing it.  However switching over to jquery it no longer 
works.

In front_site.dryml I have a tag as follows that appears on all pages of 
the site.

<def tag="project">
  <section class="project" id="project">
    <partial name="projects/projects"/>
  </section>
</def>

Projects/_projects.dryml is.  Note this is the part that is no longer 
working.  It obviously has to do with the observe_field.

<unless test="&@current_organization.new_record?">
  <%= image_tag "spinner.gif", :style => "display:none;", :id => 
"project-spinner" %>
  <label>Orginzation:&nbsp;&nbsp;<a to="&@current_organization"><%= 
@current_organization.name %></a></label> &nbsp; &nbsp;
  <label><a 
to="&@current_organization.projects">Project</a>:&nbsp;&nbsp;</label>
  <%= select_tag "project_select",
                
 options_from_collection_for_select(@current_organization.projects, "id", 
"list_name", @current_project.id),
                 {:include_blank => true} %>


  <%= observe_field "project_select", :url => {:action=>"select", 
:controller=>"projects"},
                    :method                => "GET",
                    :with                  => "'id='+value",
                    :loading               => 
"Element.show('project-spinner')",
                    :complete              => 
"Element.hide('project-spinner')" %>
</unless>

I then have an index action select in the projects controller that handles 
the ajax request.

In a nut shell I simply want a selection list of projects that gets 
submitted when the value from the selection list gets changed.  I'd love to 
use the default spinner instead of adding a new one but I couldn't get that 
to work previously.  Any help in making this work in a more Hobo and jquery 
way would be appreciated.

Thanks
Bob

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/hobousers/-/zpLsio5ME8cJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to