Introduction
You can make an awesome Mobile Applications with the help of Javascript. It is used for client side scripting. Javascripts are written into HTML page. The scripts usually run automatically while loading the page or when the user takes a certain action. JavaScript is a scripting language which affects HTML elements, like forms, images, layers, paragraphs and such, and for influencing a few non–HTML objects like the browser window.
List of JS Files
It will show you the list of JS files if you have used any with details (In which module it is used, JS file name, By which submit function it is called, if files exist or not, Preview of code etc).
Download option will be activated only when the subscribed package will include download rights, otherwise it will show N/A. There would be different JS files for Input Form and Listing.
It allows you to add new JS file and delete existing JS file.
Add New JS File
- Module Name : Select the Name of Module from the drop down
- Custom JS File Name: This will include alpha-numeric values and underscore. Extension is automatically taken.
- Submit Handler Req : Check the checkbox if Submit Function is required.
- Submit Handler Function: Write the Submit function
- Submit Callback Req : Check the checkbox if Callback Function is required.
- Submit Callback Function : Write the Callback function
- JS Code : Write your customized JS Code over here.
- Additional JS Code Req? : If additional JS code is required then check the checkbox
- Add Additional JS : Write the additional JS
- Add New : This will allow you to add more JS
- Remove Field : This will delete the newly added field
- Copy Existing Code : If you want to copy JS code from any of your project of Configure.IT, you can do! Just select the project and module and JS, it will copy the same code over here within no time.
- Add : This button will add new JS File
- Cancel : This will cancel the adding process and land user on last page
See below screen of JS Code Preview screen
Example of JS File
If you want to call JS onclick of any button/link in Add/Update form, then you perform the same with the help of below listed steps. You can show any button/link by calling a function. Just take any custom field & call PHP function from Setting.
Create PHP Function
Now , Add custom field and define PHP function name that we have defined.
Now , Add JS & define function there which is called onclick of button/link.
Now , Go to add/update form
You got the JS custom alert message so it's successfully implemented.