Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Open hyperlink

Questions related to using nuBuilder Forte.
Post Reply
treed
Posts: 205
Joined: Mon May 18, 2020 12:02 am
Been thanked: 2 times
Contact:

Open hyperlink

Unread post by treed »

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?
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: Open hyperlink

Unread post by kev1n »

Hi,

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');
        }
Post Reply