# Problem with page.insert\_html and page.select.().first

**URL:** <https://www.ruby-forum.com/t/problem-with-page-insert-html-and-page-select-first/110106>\
**Category:** Rails\
**Created:** [July 23, 2007, 10:33am UTC](https://www.ruby-forum.com/t/problem-with-page-insert-html-and-page-select-first/110106 "2007-07-23T10:33:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Solid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7cd45c/32.png) [@Solid](https://www.ruby-forum.com/u/Solid)\
**Post date:** [July 23, 2007, 10:33am UTC](https://www.ruby-forum.com/t/problem-with-page-insert-html-and-page-select-first/110106/1 "2007-07-23T10:33:43Z")

</div>

Hello RoR community,

I have a problem with the helpers in Rails 1.2.3.

HTML:

| # | Question name | Class | Type | Level | Question text | &nbsp; |
| --- | --- | --- | --- | --- | --- | --- |
| 1 | test | test | test | test | test | test |
| --- | --- | --- | --- | --- | --- | --- |
| 2 | test2 | test2 | test2 | test2 | test2 | test2 |
| --- | --- | --- | --- | --- | --- | --- |

What do I need? I need to insert into the tbody the tr record  
(

…) before all tbody’s tr elements.

How did I try? RJS:

page.insert\_html :before, page.select(’#questionTable tbody  
tr’).first, render(:partial =\> ‘question’, :locals =\> { :q =\>  
question\_copy })

Not working, but JS:

new Insertion.After($$("#questionTable tbody").first(),  
“

asdasdas”);

Work’s perfectly.

How I can solve this problem?

Dmitry
