In this blog introduction, I mentioned that - “Ruby” is pretty and comfortable as my old Girlfriend!
But in many cases I still miss my old friend “.Net”
AutoPostBack - this is where I miss my dude!
In ASP.Net we use this property to Get or Set a value indicating whether a postback to the server automatically occurs when the user changes the control selection.
We set this property to true if the server needs to capture the selection as soon as it is made. For example, other controls on the Web page can be automatically filled depending on the user's changes from a Control.
This property can be used to allow automatic population of other controls on the Web page based on a user's changes from a Control. And the value of this property is stored in view state.
AutoPostBack and Rails 3
Unfortunately, We don't have such property for controls in RoR! But we've some alternative approachs
So, I've only option to use is OnChange() javascript function! or I can make use of my new girlfriend JQuery!
AutoPostBack - this is where I miss my dude!
In ASP.Net we use this property to Get or Set a value indicating whether a postback to the server automatically occurs when the user changes the control selection.
We set this property to true if the server needs to capture the selection as soon as it is made. For example, other controls on the Web page can be automatically filled depending on the user's changes from a Control.
This property can be used to allow automatic population of other controls on the Web page based on a user's changes from a Control. And the value of this property is stored in view state.
AutoPostBack and Rails 3
Unfortunately, We don't have such property for controls in RoR! But we've some alternative approachs
- Adding an OnChange() javascript function to Controls
- Using an Observe_field or Observe_form
So, I've only option to use is OnChange() javascript function! or I can make use of my new girlfriend JQuery!