:javascript
  function prepareTextField(e, msg) {
    if (e) {
      if (e.value == msg) {
        e.value = '';
      }
    }
  }

  function revertTextField(e, msg) {
    if (e)
      if (e.value == '') {
        e.value = msg;
      }
  }

%h3 New Comment
= form_for topic_comment.to_sym do |f|
  %table
    %tr 
      %td{ :style => 'width: 80%;' }
        = f.text_area :content, :style => 'width: 100%; height: 50px;', :value => new_comment_content, :onfocus => "prepareTextField(this, \"#{new_comment_content}\");", :onblur => 'revertTextField(this, \"#{new_comment_content}\");'
        = f.hidden_field user.foreign_key.to_sym, { :value => "" }
    %tr 
      %td{ :style => 'text-align: right;' }
        = submit_tag "Save", :disable_with => "Please wait..."

:javascript
  msg = "#{new_comment_content}"
  function prepareTextField(e) {
    if (e) {
      if (e.value == msg) {
        e.value = '';
      }
    }
  }

  function revertTextField(e) {
    if (e)
      if (e.value == '') {
        e.value = msg;
      }
  }

%h3 New Comment
= form_for topic_comment.to_sym do |f|
  %table
    %tr 
      %td{ :style => 'width: 80%;' }
        = f.text_area :content, :style => 'width: 100%; height: 50px;', :value => new_comment_content, :onfocus => "prepareTextField(this);", :onblur => "revertTextField(this);"
        = f.hidden_field user.foreign_key.to_sym, { :value => instance_variable_get(:"@#{user}").id }
    %tr 
      %td{ :style => 'text-align: right;' }
        = submit_tag "Save", :disable_with => "Please wait..."

Make msg a global javascript var just for that page and pre-populate it.
Make msg a global javascript var just for that page and pre-populate it.
