RJS problem

Hi everyone!

I'm tearing my hair out over an RJS problem. I've used it before without issue, but I've no idea what is going wrong here. I'm trying to display a div which starts off invisible defined with:

<div id="block1" style="display: none;">...</div>

In my .rjs I have:

page.call("$('block1').show()")

When I run this, Firefox displays block1 but then gives me two errors:

1. "Type error $("block1").show() is not a function" 2. $("block1").show()()

Any help would be appreciated! Chav

I've discovered that an easier way to do this is:

page.show('block1')

No idea why my first attempt half worked.

Also,

page['block1'].show

works as well. I often prefer the proxied commands like that one. i.e

page['block1'].replace_html vs page.replace_html 'block1'