Jonathan, First of all, your onclick logic is very strange... an onchange would be more appropriate for a select element.
Second, the 'select' helper takes either raw tags or an array of two-element arrays for options. Try that instead of a hash. Here's a little trick I use for selectively showing or hiding an element based on a form field's value: http://pastie.caboo.se/74138 Then I can write something like: :onchange => "$('disabled_button').showIf(this, '1');" You could probably implement a showUnless just as easily. Cheers, Sean Cribbs seancribbs.com Jonathan Bradley wrote: > > Ok I'm working on a select statement right now but, I'm having issues > rendering certain aspects > > > > Here is the code from my view: > > > > %label#disabled_area{:onclick => "$('disabled_button').hide(); > $(!=0).disable(); $('submit').show();"} > > = select :video, :comedy_type, {"Select A Comedy Category" => "", > "Stand-Up Comedy" => "1", "Sketch Comedy" => "2"} > > %input{:type => "image", :id => "disabled_button", :alt => "Submit > your video!", :src => > "/images/#{current_contest.short_name}/bt-complete_upload.gif", > :disabled => true} > > %input{:type => "image", :id => "submit", :alt => "Submit your > video!", :src => > "/images/#{current_contest.short_name}/bt-complete_upload-up.gif", > :style => "display: none;"} > > > > Here is the problems: > > 1. Select A Comedy Category will not show as the first option > > 2. I need to either disable or show a button dependent on selecting an > item. That is becoming problematic as well. > > > > Any ideas are definitely appreciated > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/haml?hl=en -~----------~----~----~----~------~----~------~--~---
