RJS error: TypeError: Element.insert is not a function

hey guys i am trying to add a text filed dynamically following this
link http://railscasts.com/episodes/74-complex-forms-part-2

i'm getting this following error
RJS error: TypeError: Element.insert is not a function
i have included the required javascript line also in application.
but still i am getting this error.

Thanks in advance