Custom Javascript in ProfoundUI
-
- Profound User
- Posts: 72
- Joined: Fri May 08, 2009 2:43 pm
- First Name: David
- Last Name: Esdale
- Company Name: Guardian General Insurance
- City: Port of Spain
- State / Province: Outside Canada/USA
- Country: Trinidad and Tobago
- Location: Trinidad
- Contact:
Custom Javascript in ProfoundUI
We are looked at writing some custom javascript to supplement ProfoundUI pages. We would like to be able to do something similar to the process we use with Genie, whereby we have a .js file that is loaded with each pageload (coded in our header.html) and customize() and afterload() functions are called by Genie for each page. Do such facilities exist in ProfoundUI?
-
- New User
- Posts: 19
- Joined: Fri Jan 04, 2008 12:13 pm
- First Name: Hany
- Last Name: Elemary
- Company Name: Profound Logic Software
- Contact:
Re: Custom Javascript in ProfoundUI
Yes, you can do that in Profound UI. This can be done by using the "external javascript" property in the designer (at the record format level) to include a JavaScript file into your display file. This will allow you to browse your IFS for a JavaScript file to include.
Now you can call any function included in that JavaScript file in any of the available events -- such as onload, etc.
Now you can call any function included in that JavaScript file in any of the available events -- such as onload, etc.
-
- Profound User
- Posts: 72
- Joined: Fri May 08, 2009 2:43 pm
- First Name: David
- Last Name: Esdale
- Company Name: Guardian General Insurance
- City: Port of Spain
- State / Province: Outside Canada/USA
- Country: Trinidad and Tobago
- Location: Trinidad
- Contact:
Re: Custom Javascript in ProfoundUI
Thanks, but what I am asking is if there is a method of doing this at a global level without having to code the same file and afterload event in every screen.
In Genie, the cusomtize() and afterload() functions are call by Genie for every page load regardless of what has been coded in the designer.
In Genie, the cusomtize() and afterload() functions are call by Genie for every page load regardless of what has been coded in the designer.
-
- New User
- Posts: 19
- Joined: Fri Jan 04, 2008 12:13 pm
- First Name: Hany
- Last Name: Elemary
- Company Name: Profound Logic Software
- Contact:
Re: Custom Javascript in ProfoundUI
In this case, you need to include the JavaScript file in "start.html" This is the container where your Profound UI applications run.
This file is located under this directory structure:
/www/profoundui/htdocs/profoundui/userdata/html/start.html
This way, the JavaScript file will be available to all of your applications.
This file is located under this directory structure:
/www/profoundui/htdocs/profoundui/userdata/html/start.html
This way, the JavaScript file will be available to all of your applications.
- Alex
- Profound Logic Staff Member
- Posts: 233
- Joined: Fri Jan 04, 2008 12:10 pm
- First Name: Alex
- Last Name: Roytman
- Company Name: Profound Logic Software
- Contact:
Re: Custom Javascript in ProfoundUI
Modifying the start.html file is one way to do it. However, this file gets overwritten whenever a new version of Profound UI is installed.
To address this issue, we recently created a simplified way to include JavaScript files. You can simply drop your js files into the /www/profoundui/htdocs/profoundui/userdata/custom/js directory. Anything placed into the "custom" folder is automatically picked up and included at runtime.
This is the method I would recommend. I hope this helps.
To address this issue, we recently created a simplified way to include JavaScript files. You can simply drop your js files into the /www/profoundui/htdocs/profoundui/userdata/custom/js directory. Anything placed into the "custom" folder is automatically picked up and included at runtime.
This is the method I would recommend. I hope this helps.
Who is online
Users browsing this forum: No registered users and 1 guest