Hi I am using submit_to_remote as below.But the class not working as expected.Please help to correct it <%= submit_to_remote ''search_btn'', ''Search'', :html => {:class => ''itilbuttonlink1''}, :url => { :controller => ''service_desk'', :action => ''search_knowledge_base'', :id => @sd_ticket } %> Sijo -- 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 -~----------~----~----~----~------~----~------~--~---
How is it working, and how do you expect it to work? Julian. Learn about Ruby on Rails! CHECK OUT THE FREE VIDS (LIMITED TIME) http://sensei.zenunit.com/ On 31/03/2008, at 5:04 PM, Sijo Kg wrote:> > Hi > I am using submit_to_remote as below.But the class not working as > expected.Please help to correct it > > <%= submit_to_remote ''search_btn'', ''Search'', > :html => {:class => ''itilbuttonlink1''}, > :url => { :controller => ''service_desk'', :action > => ''search_knowledge_base'', :id => @sd_ticket } %> > > > Sijo > -- > 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 -~----------~----~----~----~------~----~------~--~---
Hi I have another cancel button just below the above submit_to_remote .It has also the same html class applied <%= link_to_remote( "Cancel", {:update => "search_kb_div", :url => {:controller => ''service_desk'', :action => ''kb_result_cancel_button'', :id => @params[:id]}}, {:class => ''itilbuttonlink1''}) %> But it is working properly.Normally a white background and when pointing out a grey one.Is my way of specifying class to submit_to_remote not right? Sijo -- 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 -~----------~----~----~----~------~----~------~--~---
It should work. Please check the output html source to see if the generated input tag has the class attribute. If so, there might be some issue with your CSS style. On Mar 31, 2:04 pm, Sijo Kg <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi > I am using submit_to_remote as below.But the class not working as > expected.Please help to correct it > > <%= submit_to_remote ''search_btn'', ''Search'', > :html => {:class => ''itilbuttonlink1''}, > :url => { :controller => ''service_desk'', :action > => ''search_knowledge_base'', :id => @sd_ticket } %> > > Sijo > -- > Posted viahttp://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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Thanks for your replies.Its output is a little bit length.I am sending this..For submit_to_remote <input class="itilbuttonlink1" name="search_btn" onclick="new Ajax.Request(''/service_desk/search_knowledge_base/9'', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this.form)}); return false;" value="Search" type="button"> And for link_to_remote (here class is working) <a class="itilbuttonlink1" href="#" onclick="new Ajax.Updater(''search_knowledgebase_div'', ''/service_desk/kb_result_cancel_button/9'', {asynchronous:true, evalScripts:true}); return false;">Cancel</a> Sijo -- 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 -~----------~----~----~----~------~----~------~--~---
On 31 Mar 2008, at 09:39, Sijo Kg wrote:> > Hi > Thanks for your replies.Its output is a little bit length.I am sending > this..For submit_to_remoteWell as you can see it is setting the class properly so something''s wrong with your css. Fred> > > <input class="itilbuttonlink1" name="search_btn" onclick="new > Ajax.Request(''/service_desk/search_knowledge_base/9'', > {asynchronous:true, evalScripts:true, > parameters:Form.serialize(this.form)}); return false;" value="Search" > type="button"> > > And for link_to_remote (here class is working) > > <a class="itilbuttonlink1" href="#" onclick="new > Ajax.Updater(''search_knowledgebase_div'', > ''/service_desk/kb_result_cancel_button/9'', {asynchronous:true, > evalScripts:true}); return false;">Cancel</a> > > Sijo > -- > 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 -~----------~----~----~----~------~----~------~--~---
I don''t know what your problem is, but when I have multiple submit buttons I do it differently and it works. I put the class on a div around the buttons. But it''s not exactly the same thing, of course. <div class="whatever"> <%= link_to_remote... %> ...and so on </div> F --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
submit_to_remote only has 3 arguments: submit_to_remote(name, value, options = {}) Your code has 4 arguments for submit_to_remote. link_to_remote is different. This works for me (Rails 2.0.2) : <%= submit_to_remote ''general'', ''Preview'', { :url => {:action => ''general_preview''}, :html => {:class => ''submitbutton''}} %> Note that there is one options hash with several sub-hashes, 3 arguments only. My .css file has an entry for ''.submitbutton'', of course. F --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
submit_to_remote only has 3 arguments: submit_to_remote(name, value, options = {}) Your code has 4 arguments for submit_to_remote. link_to_remote is different. This works for me (Rails 2.0.2) : <%= submit_to_remote ''general'', ''Preview'', { :url => {:action => ''general_preview''}, :html => {:class => ''submitbutton''}} %> Note that there is one options hash with several sub-hashes, 3 arguments only. My .css file has an entry for ''.submitbutton'', of course. F --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---