JavaScript on Lookup Page

From All n One's bxp software Wixi

Jump to: navigation, search

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 > Form Management > Primary Details > Form - 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.