Hi,
I am making use of a method button_to_function, and I want to use it in
place of link_to_remot.
The issue I am facing is that I am not able to pass all the parameters
of the remote function to button function.
I am sending both the code pieces...........
<%= link_to_remote(''<button class="n25x24"
tabindex="1">Go</button>'',
:condition=>"btn_disable(),checkNotSpecialCharacter()
!false" ,
:url => { :action => ''find'' } ,
:with
=>"''search=''+$(''search'').value+''&single_select=true''",
:method => ''get'',
:update => ''list_table'') %>
<%= button_to_function ''Go'',
"openWin(''#{url_for(
:action => ''find'',
:method => ''get'',
:with
=>"''search=''+$(''search'').value+''&structural_unit=default''",
:update => ''list_table'',
:condition=>"btn_disable(),checkNotSpecialCharacter()
!false" )}'')",
:class=>''n25x24'' %>
The main problem being that The search functionality and the condition
are not functioning .
Thank You
--
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 believe you want
submit_to_remote
Which works just like link_to_remote.
*submit_to_remote*(name, value, options = {})
Returns a button input tag that will submit form using XMLHttpRequest in the
background instead of regular reloading POST arrangement. options argument
is the same as in
form_remote_tag<http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M000535>.
On Nov 27, 2007 6:44 AM, Advait Bellur
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
>
> Hi,
>
> I am making use of a method button_to_function, and I want to use it in
> place of link_to_remot.
>
> The issue I am facing is that I am not able to pass all the parameters
> of the remote function to button function.
>
> I am sending both the code pieces...........
>
>
> <%= link_to_remote(''<button class="n25x24"
tabindex="1">Go</button>'',
> :condition=>"btn_disable(),checkNotSpecialCharacter()
!> false" ,
> :url => { :action => ''find'' } ,
> :with
=>"''search=''+$(''search'').value+''&single_select=true''",
> :method => ''get'',
> :update => ''list_table'') %>
>
>
>
> <%= button_to_function ''Go'',
> "openWin(''#{url_for(
> :action => ''find'',
> :method => ''get'',
> :with
>
=>"''search=''+$(''search'').value+''&structural_unit=default''",
> :update => ''list_table'',
> :condition=>"btn_disable(),checkNotSpecialCharacter()
!> false" )}'')",
> :class=>''n25x24'' %>
>
>
> The main problem being that The search functionality and the condition
> are not functioning .
>
> Thank You
> --
> 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 wrote:> I believe you want > > submit_to_remote > > Which works just like link_to_remote. > > *submit_to_remote*(name, value, options = {}) > > Returns a button input tag that will submit form using XMLHttpRequest in > the > background instead of regular reloading POST arrangement. options > argument > is the same as in > form_remote_tag<http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M000535>. > > > > > > On Nov 27, 2007 6:44 AM, Advait Bellur > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>Hi, Thank you very much, the submit to remote function is working fine the way I want it to work, but the button which I am making use has a :class => '' '' which gives the button a distinct look, how could I include this. <%= submit_to_remote ''GoBtn'',''Go'', :url =>{ :action => ''find''}, :with =>"''search=''+$(''search'').value+''&structural_unit=default''", :update => ''list_table'', :condition=>"btn_disable(),checkNotSpecialCharacter() != false", :method => ''get'' %> I need to include the :class => ''redbt80x80'', for the button to display a red color, how could I include this Thank you advait -- 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 -~----------~----~----~----~------~----~------~--~---