# Text\_field\_with\_auto\_complete

**URL:** <https://www.ruby-forum.com/t/text-field-with-auto-complete/61359>\
**Category:** Rails\
**Created:** [May 23, 2006, 2:30pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete/61359 "2006-05-23T14:30:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikeoligny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/839c29/32.png) [@mikeoligny](https://www.ruby-forum.com/u/mikeoligny)\
**Post date:** [May 23, 2006, 2:30pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete/61359/1 "2006-05-23T14:30:48Z")

</div>

I am having some trouble using `text\_field\_with\_auto\_complete’ in  
Firefox. For some reason, the drop-down list is being rendered  
behind other table elements.

Firefox (broken): [http://schema.ca/broke.png](http://schema.ca/broke.png)  
Safari: [http://schema.ca/safari\_works.png](http://schema.ca/safari_works.png)

I’m wondering if anyone is aware of this problem, and what I might be  
able to do to work around it?

Thanks,  
-Mike

---

<div class="post-metadata">

**Author:** ![mikeoligny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/839c29/32.png) [@mikeoligny](https://www.ruby-forum.com/u/mikeoligny)\
**Post date:** [May 23, 2006, 4:09pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete/61359/2 "2006-05-23T16:09:54Z")

</div>

Is the text field and the “mike oligny” box in a div? or diffrent  
divs? or a table?

john

---

<div class="post-metadata">

**Author:** ![mikeoligny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/839c29/32.png) [@mikeoligny](https://www.ruby-forum.com/u/mikeoligny)\
**Post date:** [May 23, 2006, 5:28pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete/61359/3 "2006-05-23T17:28:23Z")

</div>

On 23-May-06, at 9:08 AM, John I. wrote:

> Is the text field and the “mike oligny” box in a div? or diffrent  
> divs? or a table?
> 
> john

hmm.,. they’re both in tables. I have a list of orders - each order  
expands to show details (currently a list of items on the order, and  
a list of comments associated with the order.) - at the bottom of the  
items and comments there are fields to add new item / comment.

It seems like anything in my nested tables appear over top of the  
auto\_complete drop-down options. Perhaps it is related to them being  
inserted by rjs?

I would love to hear any ideas on how I could simplify this, perhaps  
the nested tables are the problem. For what I just explained, I have:

```
 list.rhtml - opens main table (including widths) for concise list

```

of order rows, renders partial \_order  
\_order.rhtml - shows one order tr and a few hidden tr’s for the  
collapsed details and respective forms  
show\_order\_detail.rjs - inserts the partials listed below and  
toggles their visibility

for the order items:

```
_order_item.rhtml
_order_item_form.rhtml
save_order_item.rjs

```

for the comments (and other details):  
\_order\_detail.rhtml  
\_order\_comment\_form.rhtml  
save\_order\_comment.rjs

I could have used yet another set of partials for table headings but  
it seems like a lot of files to me…

Also, I’m using :toggle\_appear because it Just Worked, but I think I  
will have to find another way as the entire rjs file is being  
processed on hides too. (data is being updated from server before  
being hidden). Perhaps I could put some sort of condition in my RJS  
file? I’m not sure how I would check if the user is expanding or  
collapsing using :toggle\_appear.

thanks in advance,  
-Mike

---

<div class="post-metadata">

**Author:** ![mikeoligny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/839c29/32.png) [@mikeoligny](https://www.ruby-forum.com/u/mikeoligny)\
**Post date:** [May 23, 2006, 5:46pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete/61359/4 "2006-05-23T17:46:51Z")

</div>

On 23-May-06, at 10:25 AM, Mike O. wrote:

> bottom of the items and comments there are fields to add new item /  
> comment.

I rearranged the table layout and removed a level or two and it seems  
to be working properly now. (drop down appearing on top of other  
table elements). Stuff doesn’t line up exactly as before but I think  
I can get it to… anyway, thanks for your reply - and I’m still  
curious I’m doing this all a really dumb way.
