Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , ,

Sponsored Links


how to implement reusable Js File in CakePHP.

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 16-05-2012
Member
 
Join Date: May 2012
Posts: 2
how to implement reusable Js File in CakePHP.

Sponsored Links
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

Reply With Quote
  #2  
Old 20-05-2012
EINSTEIN_007's Avatar
Member
 
Join Date: Dec 2007
Posts: 2,132
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>
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "how to implement reusable Js File in CakePHP."
Thread Thread Starter Forum Replies Last Post
CakePHP vs. Ruby on Rails pele1200 Polls & Voting 9 03-08-2012 05:26 PM
How to get id of another model in CakePHP? Iker Software Development 4 05-01-2011 03:48 AM
Need help with a project in CakePHP Ander K Software Development 4 04-01-2011 11:09 PM
What are basic Principles of CakePHP? Xanty Software Development 6 04-01-2011 10:25 PM
How to improve program by reusable code Galbraith Software Development 5 13-02-2010 04:32 AM


All times are GMT +5.5. The time now is 10:32 PM.