On Jan 25, 11:45 am, Tony Tony <[email protected]>
wrote:
> Thanks Chris! I was able to get it working!
You're very welcome. I've received help here, so hope to give it when
I can. And while we're talking about that, have we thanked the
wonderful Fred Cheung this week? Fred: you're a gem.
> Two issues I'm having with this implementation though:
>
> First, if I go to edit the form, I can see the '2' is selected but the
> guest_name field is hidden until I select a different number of tickets
> (I guess this activates/reloads the javascript). I even tried doing an
> if statement in the div: <div id="guest_name"<%= " style='hidden'" if
> [email protected] == '2' %>> which works (I can see this from the page
> source). However, the div is ALWAYS visible, until I select a different
> number of tickets and it acvtivates/reloads the javascript. Any ideas on
> how to get this to work?
Good point about the div not being visible when editing the form. I'd
better go and check my own code...
> Second, I ended up using a table structure for the form, wrapping the
> DIV around the <TR> doesn't work (the guest_name field is always
> visible). I'm guessing this is a table structure issue so I need to take
> a more in depth look.
I started off using tables for forms too, but was dissatisfied because
a table is supposed to be a way of showing tabular information (i.e.
rows of similar data) and most forms don't fall in that category.
Tables are a pain when you want to do this kind of thing because of
some browser-specific issues (Internet Explorer...). There's a
discussion on Rails Forum about using css (and not tables) to lay out
forms: http://railsforum.com/viewtopic.php?id=25297
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---