Hi,
I am finding that when I add an onclick javascript event to a lookup object, the click event is tied to the label and not the magnifier image. Any suggestions for a workaround?
Thanks!
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Onclick event on a lookup field
-
- Posts: 3
- Joined: Tue Dec 21, 2021 4:50 pm
- Has thanked: 1 time
-
- nuBuilder Team
- Posts: 4301
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Onclick event on a lookup field
Hi,
The workaround is to add a click handler in the form's Custom Code:
E.g. if your lookup's Id was emp_name, the button's Id is emp_namebutton
The workaround is to add a click handler in the form's Custom Code:
E.g. if your lookup's Id was emp_name, the button's Id is emp_namebutton
Code: Select all
$("#emp_namebutton").click(function(){
console.log('your code here');
});
-
- nuBuilder Team
- Posts: 4301
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Onclick event on a lookup field
Update: This is now fixed on Github.
The onclick event is triggered when the lookup's search button is clicked. All other events (oninput, onchange etc.) are fired for the input (lookup code)
The onclick event is triggered when the lookup's search button is clicked. All other events (oninput, onchange etc.) are fired for the input (lookup code)
-
- Posts: 3
- Joined: Tue Dec 21, 2021 4:50 pm
- Has thanked: 1 time