According to the Prototype documentation concerning the class method
Element.setStyle, the method takes "a hash of property-value pairs" as
the parameter. And, indeed, the following works as expected ...

    $( 'elm_01' ).setStyle({height: '200px'});

so why doesn't the following work ...

    var hshElmH = $H({height: '200px'});
    $( 'elm_01' ).setStyle ( hshElmH );

The console reports no errors, the script does not error out, but the
height of the element remains unchanged.  The variable hshElmH is set
to an object, whose value is: height="200px".  Or alternatively, how
does one set the height (or perhaps any style attribute) to a value
that comes from a calculation; the Hash can be constructed from
calculated values, how does one pass calculated values to the setStyle

You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to