Hola, estoy teniendo un problema con un link to remote que me esta dando
un error de "RJS _16.style is undefined" en un alert, y luego en otro
alert me muestra el contenido que habrÃa que actualizar pero en el
alert.
save_nota_receta es el ID del div que esta como oculto.
En mi controller tengo:
def private_note
@rpn = RecipePrivateNote.find(:first,:conditions=>["recipe_id=? and
person_id=?",params[:id],@logged_in.id])
render :update do |page|
page.show 'save_nota_receta'
page.replace_html 'save_nota_receta', :partial=>"recipes_notes"
end
end
en el partial tengo:
<div id="save_nota_receta" class="save_nota_receta"
style="display:none;">
<% content=@rpn.note if !@rpn.nil? %>
<div align="right"><a href="javascript:close();">Cerrar </a></div>
<% remote_form_for(RecipePrivateNote.new, :url =>
url_for(:controller=>"recipes",:action=>"save_private_note")) do |f| %>
<%= f.hidden_field "recipe_id" %>
<input type="hidden" id="recipe_private_note_person_id"
name="recipe_private_note[person_id]" value="<%= @logged_in.id%>">
Escriba / modifique su nota personal:
<%= text_area_tag "recipe_private_note[note]" ,content,{:rows=>10}
%>
<%= f.submit "Agregar" %>
<% end %>
</div>
y el link que llama a esto es asi:
<%= link_to_remote("Nota Privada", :url => { :action => "private_note",
:id => recipe.id })%>
El error es el siguiente:
alert 1:
RJS error:
TypeError: _16c.style is undefined
alert2:
element.show('save_nota_receta')
Alguien podrÃa ayudarme?
Gracias desde ya amigos de ruby!
on 2010-03-30 21:18
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.