Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, 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: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 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');
}