# Problem rendering file when error using autocomplete field

**URL:** <https://www.ruby-forum.com/t/problem-rendering-file-when-error-using-autocomplete-field/168952>\
**Category:** Rails\
**Created:** [May 27, 2009, 5:23pm UTC](https://www.ruby-forum.com/t/problem-rendering-file-when-error-using-autocomplete-field/168952 "2009-05-27T17:23:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/db5fbb/32.png) [@tni](https://www.ruby-forum.com/u/tni)\
**Post date:** [May 27, 2009, 5:23pm UTC](https://www.ruby-forum.com/t/problem-rendering-file-when-error-using-autocomplete-field/168952/1 "2009-05-27T17:23:22Z")

</div>

Is there a way to render a file from within Rails app so it is  
displayed in a new browser tab/window??

I have an auto\_complete field where users can enter letters to search  
for last name. If some sort of database  
error occurs while entering data in this field, the error is captured  
but the html file that should be displayed (a generic error page) is  
not being rendered in the browser. I can see the render command being  
issued in the Mongrel console window… And in the current view in  
the browser, some of the fields shift to the right. So it’s like  
the browser is trying to render something directly within the page.  
Thought it might be worth trying to render  
the error page to a new tab to see if that would work.

Unless anyone has seen a similar problem, and knows how to capture  
errors and display error page when  
using an auto\_complete field??
