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.
Open hyperlink
Open hyperlink
Getting back into our unBuilder project again and I'm looking to do something simple, but can't find an example. I have an edit screen with a field containing a hyperlink. How would I open it in a new window using a button?
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 447 times
- Contact:
Re: Open hyperlink
Hi,
In your Button's Custom Code, add an onclick event with this JS:
In your Button's Custom Code, add an onclick event with this JS:
Code: Select all
var v = $(' #your_field_that_contains_the_url_id').val();
if (v.length !== 0) {
window.open(v, '_blank');
}