Difference between revisions of "JavaScript on Lookup Page"
From All n One's bxp software Wixi
Philip Lacey (talk | contribs) (Created page with " == Introduction == When doing a lookup for any database in BE, the lookup page dynamically generates all of the fields and uses them as part of the search criteria IF they ...") |
Philip Lacey (talk | contribs) |
||
| Line 18: | Line 18: | ||
To hide a field | To hide a field | ||
| + | <syntaxhighlight lang="javascript"> | ||
document.getElementById('tableid_7').style.display = 'none'; | document.getElementById('tableid_7').style.display = 'none'; | ||
| + | </syntaxhighlight> | ||
2. Validation of input | 2. Validation of input | ||
Revision as of 15:27, 17 April 2012
1 Introduction
When doing a lookup for any database in BE, the lookup page dynamically generates all of the fields and uses them as part of the search criteria IF they are filled in.
We have extended the lookup page to allow our users to add custom JavaScript to the Lookup Page. This allows for a number of useful enhancements to be added to the lookup fields.
2 Uses
1. Hiding fields
It is now possible to hide lookup fields to allow the users only enter data on particular fields. This can be very useful if you use a lot of JavaScript on your main campaign as well.
To hide a field
document.getElementById('tableid_7').style.display = 'none';2. Validation of input
You can now prompt users based on their input before they go on to search.
3. Colouring
You can back colour any of the search fields as you wish using JavaScript.
3 How do you set this up?
The JavaScript is added the same way as you would use onLoad
Main Menu > Database Management > Primary Details > Campaign - Edit > Select the campaign > In the JavaScript onLoad section > Lookup code execution
In this box you can place your custom JavaScript and it will only be put onto the page on the JavaScript lookup page.