That calls your function at the time you
attach the event, returns the result from the function (null in this case) into
the Event.observe function, which is expecting a function reference. So, it
blows up. You want something more like: Event.observe('mes_appearance_s0',
'change', function () { ShowItem($F('mes_appearance_s0'), 'other',
'mes_appearance_s1'); }); Greg From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Keith Davis 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"; } This results in a Type Mismatch error. Keith Davis (214)
906-5183 From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gregory Hill 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