i''m not sure you can - the download is the last thing you need to do in
order to make things work. so you show the status page, which then 
redirects the browser to the download after it has loaded (via a 
javascript redirect probably), so the user is left with the status page 
on the screen and a download box.
something like
action:
def download
    if params = correct
       @download = true
    else
       @download = false
       errors.add etc
    end
end
and then in download.rhtml:
<body <%if @download%>
    
onload="window.location=''<%=url_for(:controller=>"download",:action=>"really_do_the_download")%>''"
<%end%>>
<%if @download%>
Downloading...
<%else%>
There were errors!
<%end%>
Edwin Moss wrote:> I am looking for an example of how to download an xml file to a
user''s
> machine.
>
> I have created a web page that allows the user to enter a file_name and 
> validates the field - using errors.add - but after a valid file_name has 
> been entered while the file does download properly, the web page is 
> never updated and it looks like there is still an error.
>
> How do I send_data and redirect_to a status page?
>
> Thanks.
>
>   
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---