Application.rhtml:
<% form_tag( {:action => 'mltn6p'} ) do -%>
<div id="page">
<div id="header">
<h1>Wendia Site entry Program</h1>
</div>
<div id="menu">
<fieldset>
<legend>Select your Shelf</legend>
<%= select(:node, :id, $shelves,{:prompt =>'Select Equipment'},{
:onchange => remote_function(:url => { :action => "gotoshelf"})} ) %>
</fieldset><br />
<%= render :partial => 'sitedata' %>
<fieldset id="downloads" style="display: none">
<legend>Download POB Files</legend>
<%= button_to 'Download CIS file', :action =>
'downloadcis' %>
<%= button_to 'Download PCCIS file', :action =>
'downloadpccis' %>
</fieldset>
</div>
<div id="content">
<div id="notification"> </div>
<%= yield %>
</div>
</div>
<% end %>
controller:
def downloadcis
send_file("#{$site.upcase}_CIS.csv", :type => 'text/plain',
:disposition => 'attachment')
end
def downloadpccis
send_file("#{$site.upcase}_PCCIS.csv", :type => 'text/plain',
:disposition => 'attachment')
end
On Thu, Feb 12, 2009 at 9:24 PM, bill walton <[email protected]> wrote:
>
>
> On Thu, 2009-02-12 at 17:29 -0800, Me wrote:
> > Anyone have any idea why one button does a submit and
> > the other does a file download?
>
> In general, element behavior in any page is a function of the browser
> parser's ability to make sense of the code we feed it. Post your code
> and we might be able to help.
>
> Best regards,
> Bill
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---