button_to_function

Hi
  I have
<%= button_to_function "Save As Resolved",{'class' => 'itilbuttonlink1'}
do |page|
    page.visual_effect :BlindDown, 'here_call_sd_resolution_div'
end %>

Here can I use :before clause as in the case of link_to_remote..What I
am trying is before the div 'here_call_sd_resolution_div' is shown(by
default its visibility hidden), call a javascript to check a particular
field is empty or not..And I want the div be shown only that field(say
for example a text field) is non empty.How can I do this?

Thanks in advance
Sijo