I installed focus_fu, and when I use
<%= f.text_field(:description, :focus => true) %>
it doesn’t do anything. I have never used plugins before, so I don’t
know if I need to include something or what I need to do.
~Jeremy
I installed focus_fu, and when I use
<%= f.text_field(:description, :focus => true) %>
it doesn’t do anything. I have never used plugins before, so I don’t
know if I need to include something or what I need to do.
~Jeremy
ok, so for just a general focusing issue now, I added
Event.observe(window, ‘load’, function() {
var e = $A(document.getElementsByTagName(‘*’)).find(function(e) {
return (e.tagName.toUpperCase() == ‘INPUT’ && (e.type == ‘text’ ||
e.type == ‘password’))
|| e.tagName.toUpperCase() == ‘TEXTAREA’;
});
if (e) e.focus();
});
to my application.js, and when I view source I get
Issue:
or cancel
but it still doesn’t work. I have to click on the text_field before I
type. I tired both firefox and I.E. and it doesn’t work on either. When
I use focus_fu,
the view source adds
ideas?
~Jeremy
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs