InventoryTrackers
2009-Mar-10 20:31 UTC
Making the ''Back'' link look the same as form.submit "Save"
Does anybody know how Rails paints that cool blue box around the <%form.submit "Save" %> In most of my forms I''ve got a "Back" link ( ex: <%= link_to ''Back'', return_path %>. I''d like this link to share the same ''look and feel''. When I look at the browser source the code that rails generates it shows this; <p> <input id="record_submit" name="commit" type="submit" value="Save" /> </p> Has anybody built .css around any of these properties to make this link look like the same graphic button created by <%= form.submit "Save" %>? David --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Eric
2009-Mar-10 20:52 UTC
Re: Making the ''Back'' link look the same as form.submit "Save"
What "cool blue box?" My submit buttons just look like buttons, so you probably already have some CSS that you could copy. On Mar 10, 1:31 pm, InventoryTrackers <inventorytrack...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Does anybody know how Rails paints that cool blue box around the <%> form.submit "Save" %> > In most of my forms I''ve got a "Back" link ( ex: <%= link_to ''Back'', > return_path %>. > > I''d like this link to share the same ''look and feel''. > > When I look at the browser source the code that rails generates it > shows this; > > <p> > <input id="record_submit" name="commit" type="submit" > value="Save" /> > </p> > > Has anybody built .css around any of these properties to make this > link look like the same graphic button created by <%= form.submit > "Save" %>? > > David--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Robert Walker
2009-Mar-10 20:53 UTC
Re: Making the ''Back'' link look the same as form.submit "Sav
InventoryTrackers wrote:> Has anybody built .css around any of these properties to make this > link look like the same graphic button created by <%= form.submit > "Save" %>?That button doesn''t even look the same between different browsers. Your only hope is to use a button to go back instead of a link. CSS isn''t going to cut it. You can use a button with JavaScript to make it act like a link to back. Well actually, I can think of another way, but it''s just the opposite. You could use a link with JavaScript to replace your submit button, where the JavaScript submits the form. Then you can create CSS to make the two links look like buttons. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Tom Z Meinlschmidt
2009-Mar-11 00:26 UTC
Re: Making the ''Back'' link look the same as form.submit "Save"
InventoryTrackers wrote:> Does anybody know how Rails paints that cool blue box around the <%> form.submit "Save" %> > In most of my forms I''ve got a "Back" link ( ex: <%= link_to ''Back'', > return_path %>.try to use Safari browser :) apple.com/safari .snap tom -- ==============================================================================Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz ============================================================================== --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Robert Walker
2009-Mar-11 06:22 UTC
Re: Making the ''Back'' link look the same as form.submit "Sav
Tom Z Meinlschmidt wrote:> InventoryTrackers wrote: >> Does anybody know how Rails paints that cool blue box around the <%>> form.submit "Save" %> >> In most of my forms I''ve got a "Back" link ( ex: <%= link_to ''Back'', >> return_path %>. > > try to use Safari browser :) apple.com/safariYes, If the OP is talking about the Mac OS X "focus ring" (light blue border surrounding the first responder) then yes, that''s completely implemented by Safari and has nothing to do with Rails, HTML or CSS. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Brian Hogan
2009-Mar-12 03:40 UTC
Re: Making the ''Back'' link look the same as form.submit "Sav
I have found that the best solution to this problem is to use an image button for the submit button, and then use css to apply the same image to the back link. It''s accessible and requires no javascript. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Robert Walker
2009-Mar-13 14:25 UTC
Re: Making the ''Back'' link look the same as form.submit "Sa
Brian Hogan wrote:> I have found that the best solution to this problem is to use an image > button for the submit button, and then use css to apply the same image > to the back link. It''s accessible and requires no javascript.That''s not a bad approach. It would be one way to get a consistent look, although not a platform specific look. However, recently I''ve taken the up the practice that I see a lot of Rails developers using: I just accept the web by using a standard submit button, and standard hyperlink. Then I try to design my pages around that concept. There already exists a "mental model" around form buttons and hyperlinks. Trying to hide the differences between them behind a visual facade can actually work against the existing "mental model." Making a link look like a button might actually be more confusing. For example when I see a link I know right away that clicking it will simply take me to another page. It won''t submit any information related to the form. At least that''s the expected behavior. The "mental model," however, can be broken in a number of different ways. For example, it is possible to attach a script to a link that does actually submit information from the form, or change some state on the server. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Brian Hogan
2009-Mar-13 14:51 UTC
Re: Making the ''Back'' link look the same as form.submit "Sa
@Robert: I totally agree with your approach. I was merely stating how the requested goal could be achieved. As web experts, you and I understand how the web works and how users perceive things, but our clients often demand that we do things in different ways. On Fri, Mar 13, 2009 at 9:25 AM, Robert Walker <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Brian Hogan wrote: >> I have found that the best solution to this problem is to use an image >> button for the submit button, and then use css to apply the same image >> to the back link. It''s accessible and requires no javascript. > > That''s not a bad approach. It would be one way to get a consistent look, > although not a platform specific look. However, recently I''ve taken the > up the practice that I see a lot of Rails developers using: I just > accept the web by using a standard submit button, and standard > hyperlink. Then I try to design my pages around that concept. > > There already exists a "mental model" around form buttons and > hyperlinks. Trying to hide the differences between them behind a visual > facade can actually work against the existing "mental model." Making a > link look like a button might actually be more confusing. For example > when I see a link I know right away that clicking it will simply take me > to another page. It won''t submit any information related to the form. At > least that''s the expected behavior. > > The "mental model," however, can be broken in a number of different > ways. For example, it is possible to attach a script to a link that does > actually submit information from the form, or change some state on the > server. > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Robert Walker
2009-Mar-13 15:04 UTC
Re: Making the ''Back'' link look the same as form.submit "Sa
Brian Hogan wrote:> @Robert: > > I totally agree with your approach. I was merely stating how the > requested goal could be achieved. As web experts, you and I understand > how the web works and how users perceive things, but our clients often > demand that we do things in different ways.@Brian. Yes, thanks for pointing that out. As developers we often do things we don''t completely agree with in order to satisfy the needs and wants of our clients. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
marshall ruiters
2009-Mar-13 15:26 UTC
Re: Making the ''Back'' link look the same as form.submit "Sa
I DO NOT MARSHALL 1. [?][?] On Fri, Mar 13, 2009 at 5:04 PM, Robert Walker < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Brian Hogan wrote: > > @Robert: > > > > I totally agree with your approach. I was merely stating how the > > requested goal could be achieved. As web experts, you and I understand > > how the web works and how users perceive things, but our clients often > > demand that we do things in different ways. > > @Brian. Yes, thanks for pointing that out. As developers we often do > things we don''t completely agree with in order to satisfy the needs and > wants of our clients. > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---