RJS: Button to set style to visible

Hi everybody!

I'm back with a new question, this time about ruby on rails with
javascript

I have a hidden div in my page and like to set its style to visible if
someone clicks a button. But this:

<div id="new_item">
    <h1>add new item </h1></br>
    <p>To add a non existing item choose the type of media:</p>
    <%= button_to_function '+ new item', update_page { |page|
page.setStyle('create_new_item', '{visibility:visible}')} %>
  </div>
  <div id="create_new_item" style="visibility:hidden;">
    <%= form_remote_tag :url => {:action => 'items/create'}, :html =>
{:multipart => true}, :update => 'create_new_item' %>
      <p>Challenge Title: </p>
      <%= text_field_tag 'item' 'title'%> <br/>
      <p>Description: </p>
      <%= text_field_tag 'item' 'description'%><br/>
      <p>Challenge Photo: </p>
      <%= file_field_tag :picture%>
      <%= submit_tag 'Create' %>
    </form>
  </div>

only renders this javascript part:

<input onclick="try {SetStyle} catch (e) { alert('RJS error:\n\n' +
e.toString()); alert('SetStyle'); throw e };" type="button" value="+ new
item" />

There is no element and also not the change of the style included.

I think it's a realy easy one, but I'm new with ruby on rails, so for me
it isn't :slight_smile:

thanks for the help, manuel