Hello, I'm trying to insert a partial into a jquery dialog box. The dialog box is working but no partial..
Here is my code :
application.js
$(document).ready(function(){
$("#add_note").click(function(){
$("#notes").html("<%= escape_javascript(render(:partial => @note)) %>").dialog({title: 'Basic Dialog'})
})
})
my view
<div class="title">
<span>Historique :</span>
<span id="add_note">Ajouter une note</span>
</div>
<div id="notes">
</div>
my partial in myview/_note.html.erb
<div class="note">
<%= form_for(@add_note) do |f| %>
<dl>
<dt>Type de note</dt>
<dd><%= f.collection_select :note_type_id, NoteType.find(:all), :id, :label, :allow_blank => "Type" %></dd>
</dl>
<dl>
<dt>Titre :</dt>
<dd><%= f.text_field :title %></dd>
</dl>
<dl>
<dt>Description :</dt>
<dd><%= f.text_field :description %></dd>
</dl>
<%= f.hidden_field :project_id, :value => @project_id %>
<%= f.hidden_field :organization_id, :value => @project.organization_id %>
<%= f.hidden_field :user_create_id, :value => current_user.id %>
<%= f.hidden_field :domain_id, :value => current_user.domain_id %>
<%= f.hidden_field :created_at %>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
If you have a clue, it would be very helpful! Thanks
Fabien