Re: render :action => bla, :anchor => ''bla''

Mischa Berger
2007-06-06T21:33:50Z

Thanks for the tip. I found another workaround... It may not look so
nice, but it works:

If an error occurs, call a javascript that scrolls to the anchor:

<% if flash[:cancel_error] %>
window.onload =
scrollToError;

<%= flash[:cancel_error] %>
<% end %>

function scrollToError(){ window.location.hash = ''#error''; }

--
Posted via http://www.ruby-forum.com/.