hi, guys, I''m trying to develop a search functionality in my application that caters to the non-Javascript crowd of users. In my basic search form,I would have the following elements: 1) category - select box 2) sub category - select box 3) keywords - text field I am trying to figure out how to implement the first two elements. This is a workflow: 1) User loads localhost:3000/search 2) Basic search form loads with the abovementioned 3 elements 3) User picks a category from the "Category" select box 4) User clicks on a button next to the selectbox named "get sub categories". 5) Upon clicking on the "get sub categories" button, the form will be submitted to the controller 6) The whole page reloads again and the "sub category" selectbox gets populated with values. 7) user enters some keywords (optional) 8) User clicks "Submit" 9) Search results show. Questions: ---------------- Not wanting to use Javascript, 1) can anyone tell me how to blank out the values in the "sub categories" when the "category" select box is changed? This is to make sure people can''t make wrong searches by selecting sub categories that do not belong to a given category. One idea I have was to use the "onClick" or "onChange" attributes which I have used before for other apps which have javascript catered for. I looked at http://www.htmlcodetutorial.com/forms/_INPUT_onChange.html. 2) does anyone know how to cause a submission to the page as soon as the value in the "category" select box is changed? Thanks, guys! :) -- 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.
hello? -- 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.
On Sat, Dec 5, 2009 at 7:52 PM, ct9a <anexiole-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m trying to develop a search functionality in my application that > caters to the non-Javascript crowd of users.> Not wanting to use Javascript, > > 1) can anyone tell me how toJavaScript.> 2) does anyone know how toJavaScript. You''re describing client-side behavior. That means "JavaScript" :-) (OK, alternatively, you could use Flash or a Java applet, but ...) -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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.
> > 2) does anyone know how to > > JavaScript. > > You''re describing client-side behavior. That means "JavaScript" :-) > > (OK, alternatively, you could use Flash or a Java applet, but ...)sigh. If only browsers shipped with javascript that cannot be turned off . Then again, there are screen readers that won''t pass. -- 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.