Hi I would like to construct a button like <button type="button" onclick="javascript:test();" class="form-button2 fixed3"><span>Add </span></button> And I used the helper button_to_remote for this like <%= button_to_remote("<span>Add</span>", { :url => some_url(@id), :condition => "check_valid()", :with=> "''ids=''+user_ids"}, {:class => "form-button2 fixed3"} ) %> I get the functionality correctly But it produces html like <input type"button" class="form-button2 fixed3"......../> So ignoring css style Please tell me which helper to use to get html like <button type="button"... Thanks in advance Tom -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi Did not get ny reply. Please help. It is urgent Tom -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Tom Mac wrote:> Hi > Did not get ny reply. Please help. It is urgent > > TomBumping after 5 hours doesn''t make people want to help you. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi You are right. But still the problem. Please help if possible Tom -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I don''t think there is a method you''ll be able to use to generate a <button> tag. There seem to be some compatibility issues with that tag. I guess you have your reasons to be using <button> instead of <input type="button">. In any case, since the call to button_to_remote will just generate a string that will be passed back to the browser as html maybe you can just hack something with a regex and manipulate the result of button_to_remote to replace the initial ''<input'' with ''<button''. I don''t know if that will work but it could be worth a try? On Jun 6, 11:44 pm, Tom Mac <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi > You are right. But still the problem. Please help if possible > > Tom > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
On 4 June 2010 05:40, Tom Mac <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi > I would like to construct a button like > <button type="button" onclick="javascript:test();" class="form-button2 > fixed3"><span>Add </span></button> > > And I used the helper button_to_remote for this like > > <%= button_to_remote("<span>Add</span>", > { :url => some_url(@id), > :condition => "check_valid()", > :with=> "''ids=''+user_ids"}, > {:class => "form-button2 fixed3"} > ) %> > > I get the functionality correctly But it produces html like > > <input type"button" class="form-button2 fixed3"......../> So > ignoring css style > > Please tell me which helper to use to get html like <button > type="button"...You can always just put the raw html in yourself. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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 Finally I solved like <button type="button" onclick="if (check_valid()) { new Ajax.Request(''<%= some_url(@id) %>'', { asynchronous:true, evalScripts:true, parameters:''ids=''+user_ids });};" class="form-button2 fixed3"><span>Add </span></button> And may I conclude that there is no helper which gives exact raw html like <button type="button Tom -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.