Results 1 to 2 of 2

Thread: how to implement reusable Js File in CakePHP.

  1. #1
    Join Date
    May 2012
    Posts
    2

    how to implement reusable Js File in CakePHP.

    hi.
    this is my another doubt regarding the Js Helper.
    I want to know, the way and the steps for making reusable .js file or library for clientside validation, which i can implements in all the ctp file for my application.
    so is there any way in cake, that we can make use of reusable js file. if yes then where it should be placed? and How to implement it in order to make use, the functions for validation.
    i'm confused. please help

  2. #2
    Join Date
    Dec 2007
    Posts
    2,291

    Re: how to implement reusable Js File in CakePHP.

    I think that you just only need to enable no-conflict mode in jQuery, see:

    http://docs.jquery.com/Using_jQuery_...ther_Libraries
    Code:
    <html>
      <head>
        <script src="prototype.js"></script>
        <script src="jquery.js"></script>
        <script>
          jQuery.noConflict();
           // Use jQuery via jQuery(...)
          jQuery(document).ready(function(){
            jQuery("div").hide();
          });
           // Use Prototype with $(...), etc.
          $('someid').hide();
        </script>
      </head>
      <body></body>
     </html>

Similar Threads

  1. CakePHP vs. Ruby on Rails
    By pele1200 in forum Polls & Voting
    Replies: 9
    Last Post: 03-08-2012, 05:26 PM
  2. Links between models in CakePHP
    By Dante i in forum Software Development
    Replies: 4
    Last Post: 05-01-2011, 07:43 AM
  3. How to get id of another model in CakePHP?
    By Iker in forum Software Development
    Replies: 4
    Last Post: 05-01-2011, 04:48 AM
  4. Need help with a project in CakePHP
    By Ander K in forum Software Development
    Replies: 4
    Last Post: 05-01-2011, 12:09 AM
  5. How to improve program by reusable code
    By Galbraith in forum Software Development
    Replies: 5
    Last Post: 13-02-2010, 05:32 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,565,120.40646 seconds with 17 queries