Button that takes URL field value and goes to website

Button that takes URL field value and goes to website

Postby Dalkeith » Thu Jun 23, 2016 6:08 pm

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
Dalkeith
 
Posts: 25
Joined: Thu Jun 23, 2016 6:03 pm
Location: Edinburgh

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

Postby admin » Fri Jun 24, 2016 11:29 am

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 2530 times


Steven
admin
Site Admin
 
Posts: 3348
Joined: Mon Jun 15, 2009 9:53 am

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

Postby Dalkeith » Fri Jun 24, 2016 6:56 pm

Brilliant thanks will try it out
Dalkeith
 
Posts: 25
Joined: Thu Jun 23, 2016 6:03 pm
Location: Edinburgh

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

Postby Dalkeith » Fri Jun 24, 2016 8:16 pm

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.
Dalkeith
 
Posts: 25
Joined: Thu Jun 23, 2016 6:03 pm
Location: Edinburgh

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

Postby admin » Mon Jun 27, 2016 8:23 am

Dalkeith,

Did you read the url link I attached earlier?

Steven
admin
Site Admin
 
Posts: 3348
Joined: Mon Jun 15, 2009 9:53 am

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

Postby Dalkeith » Tue Jun 28, 2016 6:53 pm

Thanks Steve - I thought I did but clearly I missed something I will reread.
Dalkeith
 
Posts: 25
Joined: Thu Jun 23, 2016 6:03 pm
Location: Edinburgh

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

Postby admin » Mon Jul 04, 2016 9:12 am

.
admin
Site Admin
 
Posts: 3348
Joined: Mon Jun 15, 2009 9:53 am


Return to General