User Guide > Tasks > Managing JavaScript Libraries > Adding a JavaScript User Library

Adding a JavaScript User Library

This procedure describes how to add a JavaScript User library to your project. Including a JavaScript User library in your project saves you time in writing and debugging code, as you are re-using debugged code, and is available in functionalities such as Content Assist.

JavaScript libraries can only be added to PHP projects with JavaScript support enabled.

 

 

Instructions on how to complete a procedure

To add a new JavaScript Library to your project:

  1. Select Configure from the right click menu of you project in your project directory and select Convert to JavaScript Project.

  2. Go to Project | Properties | JavaScript | Include Path - or - Select Properties | JavaScript | Include Path from the Right Click Menu of the project folder in your project directory.
    Your project's properties page opens.

  1. In the JavaScript Libraries Properties page click Add JavaScript Library.
    The "Add JavaScript Library" dialog opens with a list of the available JavaScript libraries.

  1. Select "User Library" and click Next.
    The "User Library" dialog opens.

  2. Click Configure User Libraries.
    The "User Libraries" preferences page opens.

  1. Click New.
    The "User library name" dialog opens.

  2. Enter the name of your user library and click Ok.
    Your user library now appears in the list of JavaScript user libraries.

  3. The User Libraries preferences page allows you to do the following using the buttons in the screen:

  • Use the Edit button to edit the name of the JavaScript user library.

  • Use the Add .js file to browse and select a .js file to add to your JavaScript user library.  

  • Use the Add folder button to browse and select a folder to add to your JavaScript user library.

  • Use the Remove button to remove a JavaScript user library.

  • For information about the Import and  Export buttons see Exporting JavaScript User Libraries and Importing JavaScript User Libraries.

  • For information about Access rules see Editing Access Rules.

  1. To apply changes click Finish.

Functionalities such as Content Assist will now be able to access the JavaScript user library. You can see the library in the "JavaScript Resources" node in your Project directory.

For information on Managing JavaScript libraries see Managing JavaScript Libraries.

 

 

 

Related Links:
 JavaScript Libraries

Working with Prototype JavaScript Library

Working with jQuery JavaScript Library

Debugging JavaScript

Managing JavaScript Libraries

Adding a JavaScript Library

Adding a Library Folder to JavaScript Libraries

Exporting JavaScript User Libraries

Importing JavaScript User Libraries

Editing JavaScript Libraries

Removing JavaScript Libraries

Managing PHP Libraries

 

 

©1999-2013 Zend Technologies LTD. All rights reserved.