Ah, that worked. Awesome. Thanks.
Keith Davis (214) 906-5183 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Davis Sent: Tuesday, June 27, 2006 4:22 PM To: rails-spinoffs@lists.rubyonrails.org Subject: RE: [Rails-spinoffs] Event.observe Ok. Now the event is working, but here's my real problem.
Here's the observe script:
Event.observe('mes_appearance_s0', 'change',
ShowItem($F('mes_appearance_s0'), 'other',
'mes_appearance_s1'));
and the code for ShowItem:
function ShowItem($value, $match,
$item){
if($value == $match)
$($item).style.display = "inline";
else $($item).style.display = "none"; }
This
results in a Type Mismatch error.
Keith Davis (214) 906-5183 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gregory Hill Sent: Tuesday, June 27, 2006 2:12 PM To: rails-spinoffs@lists.rubyonrails.org Subject: RE: [Rails-spinoffs] Event.observe Should be ‘change’, not
‘onchange’. Also, are you doing that after the elements in question have
been added to the DOM (as in, farther down the page or in an onload event or
something)? Greg From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Keith Davis I'm
not sure if I'm understanding this correctly.
<SCRIPT
LANGUAGE="_javascript_" TYPE="TEXT/_javascript_">
Neither of these produce any errors,
nor do they work. Keith
Davis - MCSA, A+, N+ |
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs