# Ajax with JQuery

**URL:** <https://www.ruby-forum.com/t/ajax-with-jquery/189526>\
**Category:** Rails\
**Created:** [June 2, 2010, 2:06pm UTC](https://www.ruby-forum.com/t/ajax-with-jquery/189526 "2010-06-02T14:06:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmanivannancse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8491ac/32.png) [@jmanivannancse](https://www.ruby-forum.com/u/jmanivannancse)\
**Post date:** [June 2, 2010, 2:06pm UTC](https://www.ruby-forum.com/t/ajax-with-jquery/189526/1 "2010-06-02T14:06:03Z")

</div>

I have used Ajax link and live validation in index.rhtml  
Ajax link requires JavaScript “prototype” and live validation requires  
“jquery”.  
i got “element.dispatchEvent is not a function” on the firebug console  
when i used “prototype” and “jquery” in same page index.rhtml  
after i removed javascript “prototype” library, i got “Ajax is not  
defined” on the firebug console when i clicking ajax link.  
how can i use both ajax and jquery in the same page?  
Can anybody give me a solution for this?

For example:

\<%=javascript\_include\_tag “prototype”%\>  
\<%=javascript\_include\_tag “jquery”%\>  
\<%= javascript\_include\_tag ‘livevalidation/jquery.validate’ %\>  
\<%= javascript\_include\_tag ‘livevalidation/jquery.validation.functions’  
%\>  
\<%= stylesheet\_link\_tag ‘livevalidation/jquery.validate’ %\>  
\<%= stylesheet\_link\_tag ‘livevalidation/style’ %\>

\<%=link\_to\_remote “new user”,:url=\>{:action=\>:a},:update=\>“div”%\>

\<% form\_for(@user) do |f| %\> 

\<%= f.label :name %\>  
 \<%= f.text\_field :name %\>

\<%= f.submit "Register"%\>

\<% end %\>

---

<div class="post-metadata">

**Author:** ![jmanivannancse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8491ac/32.png) [@jmanivannancse](https://www.ruby-forum.com/u/jmanivannancse)\
**Post date:** [June 2, 2010, 3:23pm UTC](https://www.ruby-forum.com/t/ajax-with-jquery/189526/2 "2010-06-02T15:23:52Z")

</div>

Try using the noConflict setting

On Jun 2, 8:06 am, Manivannanj J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
