Wheels is only a hammer
Thursday, October 8th, 2009My posting this is a seriously delayed reaction. But I must admit that I was using Wheels as a hammer and trying to treat a problem like a nail when I wrote about creating a Wheels partial for setting form focus.
Stephen came up with a much nicer jQuery-only solution for setting form focus:
$(document).ready(function(){ $(”.focus”).focus(); });
So now you can set form focus on load by setting that element’s class to focus. No need to create a Wheels partial and set a variable in your CFML.
In my newbness, I wasn’t thinking that you could have that $(".focus") hanging there without it applying to something on every page. Now I am schooled.
Thanks Stephen!


October 20th, 2009 at 11:57 am
I find myself getting schooled lately too. It happens to the best of us.
October 20th, 2009 at 3:27 pm
Tit-for-tat, Chris. I am just getting into Wheels, and am getting schooled regularly myself. Cheers!
October 20th, 2009 at 10:16 pm
Thanks for getting my back, guys. At least we’re all in similar company!