Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

Button that takes URL field value and goes to website

Locked
Dalkeith
Posts: 40
Joined: Thu Jun 23, 2016 10:33 am
Location: Edinburgh
Contact:

Button that takes URL field value and goes to website

Unread post by Dalkeith »

Forum

I have a form with a field that holds URLs

It would be nice if there was a a button next to the field on the form that when pressed would navigate in a browser to the URL ideally in a new tab of the browser that they have open.

Is this or something like this possible and could anyone give me some guidance.
I am only starting to get into the design of forms

Thanks
PS using nuBuilder more and more
My Blog - cloudydatablog.net https://cloudydatablog.net/
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: Button that takes URL field value and goes to website

Unread post by admin »

Dalkeith,

This is how you open another window..http://www.w3schools.com/jsref/met_win_open.asp

And you put it on a button like this..
Capture.PNG
Capture.PNG (15.43 KiB) Viewed 3707 times
Steven
Dalkeith
Posts: 40
Joined: Thu Jun 23, 2016 10:33 am
Location: Edinburgh
Contact:

Re: Button that takes URL field value and goes to website

Unread post by Dalkeith »

Brilliant thanks will try it out
My Blog - cloudydatablog.net https://cloudydatablog.net/
Dalkeith
Posts: 40
Joined: Thu Jun 23, 2016 10:33 am
Location: Edinburgh
Contact:

Re: Button that takes URL field value and goes to website

Unread post by Dalkeith »

That worked great the only issue I have is that if the field does not reference 'http:/' as well as the url it combines the url in the url field to the existing url in the browser and creates a new window with the joint url.
My Blog - cloudydatablog.net https://cloudydatablog.net/
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: Button that takes URL field value and goes to website

Unread post by admin »

Dalkeith,

Did you read the url link I attached earlier?

Steven
Dalkeith
Posts: 40
Joined: Thu Jun 23, 2016 10:33 am
Location: Edinburgh
Contact:

Re: Button that takes URL field value and goes to website

Unread post by Dalkeith »

Thanks Steve - I thought I did but clearly I missed something I will reread.
My Blog - cloudydatablog.net https://cloudydatablog.net/
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: Button that takes URL field value and goes to website

Unread post by admin »

.
Locked