1

I am using cakephp 1.3.

I want to use its Ajax helper and the CakePHP 1.3 AJAX documentation says that I will have to use prototype.js and scriptaculous.js to work with it.

But I am already using jQuery for my project and it conflicts with the prototype.js file.

So is there any way to work with Ajax helper and jQuery instead of Ajax helper and prototype / scriptaculous? (I don't want to use prototype.)

Thanks.

2 Answers 2

2

Quoted from the red box at the top of that page:

Both the JavascriptHelper and the AjaxHelper are deprecated, and the JsHelper + HtmlHelper should be used in their place.

Have a look at the documentation for the JsHelper instead.

Sign up to request clarification or add additional context in comments.

Comments

1

From the link you provided:

Both the JavascriptHelper and the AjaxHelper are deprecated, and the JsHelper + HtmlHelper should be used in their place. See The Migration Guide

On Js helper page:

Since the beginning CakePHP's support for Javascript has been with Prototype/Scriptaculous. While we still think these are an excellent Javascript library, the community has been asking for support for other libraries. Rather than drop Prototype in favour of another Javascript library. We created an Adapter based helper, and included 3 of the most requested libraries. Prototype/Scriptaculous, Mootools/Mootools-more, and jQuery/jQuery UI. And while the API is not as expansive as the previous AjaxHelper we feel that the adapter based solution allows for a more extensible solution giving developers the power and flexibility they need to address their specific application needs.

echo $this->Html->script('jquery'); // Include jQuery library

And also take a look at the jQuery AJAX pagination example.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.