# How to open/link new page in wix code

**URL:** <https://forum.wixstudio.com/t/how-to-open-link-new-page-in-wix-code/19732>\
**Category:** Ask the community\
**Tags:** wix-bookings, question, code\
**Created:** [January 18, 2018, 4:11pm UTC](https://forum.wixstudio.com/t/how-to-open-link-new-page-in-wix-code/19732 "2018-01-18T16:11:15Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierreyvesmeyer](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pierreyvesmeyer](https://forum.wixstudio.com/u/pierreyvesmeyer)\
**Post date:** [January 18, 2018, 4:11pm UTC](https://forum.wixstudio.com/t/how-to-open-link-new-page-in-wix-code/19732/1 "2018-01-18T16:11:15Z")

</div>

Hello,  
I have a radio button  
Depending to the choice, I just want to open a new page…

if ($w(“#bookingRadioGroup”).value === “multiCity”) {  
=\>\> Open the page “Confirmation”;  
}

I did not find the solution in the doc.

Can you please help?  
Thx  
Regards,  
Pierre-yves

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [January 18, 2018, 4:38pm UTC](https://forum.wixstudio.com/t/how-to-open-link-new-page-in-wix-code/19732/2 "2018-01-18T16:38:17Z")

</div>

Hi Pierre-yves,

You can use wix-location.to() to navigate to the new page.

Here’s some sample code:

```javascript
import wixLocation from 'wix-location'; 

if ($w("#bookingRadioGroup").value === "multiCity") {
    wixLocation.to("/Confirmation);
}

```

This is one way to do it, and should get you going.

Good luck,

Yisrael

---

<div class="post-metadata">

**Author:** ![pierreyvesmeyer](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pierreyvesmeyer](https://forum.wixstudio.com/u/pierreyvesmeyer)\
**Post date:** [January 20, 2018, 3:09pm UTC](https://forum.wixstudio.com/t/how-to-open-link-new-page-in-wix-code/19732/3 "2018-01-20T15:09:55Z")

</div>

Hello Yisrael,

Thanks for your help…  
It is not working - Could it be an permission issue ?  
Or the related page should be a sub-page ?

When I click to the link, the linking page did not open…

export function text2MultiLeg\_click(event, $w) {  
wixLocation.to(“/Contact\_Member”);  
}

Thanks again  
regards,  
pierre-yves

---

<div class="post-metadata">

**Author:** ![roi-bendet](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/roi-bendet/32/1283_2.png) [@roi-bendet](https://forum.wixstudio.com/u/roi-bendet)\
**Post date:** [January 21, 2018, 10:24am UTC](https://forum.wixstudio.com/t/how-to-open-link-new-page-in-wix-code/19732/4 "2018-01-21T10:24:33Z")

</div>

Hi,  
Can you please share a link to your site so we can inspect ?  
Roi

---

<div class="post-metadata">

**Author:** ![pierreyvesmeyer](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pierreyvesmeyer](https://forum.wixstudio.com/u/pierreyvesmeyer)\
**Post date:** [January 21, 2018, 4:25pm UTC](https://forum.wixstudio.com/t/how-to-open-link-new-page-in-wix-code/19732/5 "2018-01-21T16:25:28Z")

</div>

Hi Roi,

This is a “Members Only”. I guess you need a profile to test ?  
Could the issue comes from the permission ?

Thx  
regards,  
pym

---

<div class="post-metadata">

**Author:** ![roi-bendet](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/roi-bendet/32/1283_2.png) [@roi-bendet](https://forum.wixstudio.com/u/roi-bendet)\
**Post date:** [January 22, 2018, 7:46am UTC](https://forum.wixstudio.com/t/how-to-open-link-new-page-in-wix-code/19732/6 "2018-01-22T07:46:52Z")

</div>

Hi,  
No permissions are needed for wixLocation.to.  
Just the link, No need a profile to test.  
Roi

---

<div class="post-metadata">

**Author:** ![pierreyvesmeyer](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pierreyvesmeyer](https://forum.wixstudio.com/u/pierreyvesmeyer)\
**Post date:** [January 22, 2018, 2:23pm UTC](https://forum.wixstudio.com/t/how-to-open-link-new-page-in-wix-code/19732/7 "2018-01-22T14:23:50Z")

</div>

Dear Roi,  
I finally found out the problem with your last comments… thanks.  
The problem was the page has been initially built with a copy/paste and on the SEO page I did not change the url link which was not what i expected… oups…

Thx for your help !  
regards,  
pym

---

<div class="post-metadata">

**Author:** ![roi-bendet](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/roi-bendet/32/1283_2.png) [@roi-bendet](https://forum.wixstudio.com/u/roi-bendet)\
**Post date:** [January 23, 2018, 8:59am UTC](https://forum.wixstudio.com/t/how-to-open-link-new-page-in-wix-code/19732/8 "2018-01-23T08:59:11Z")

</div>

🙂

---

<div class="post-metadata">

**Author:** ![rafaelguidapanicali](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/rafaelguidapanicali/32/16322_2.png) [@rafaelguidapanicali](https://forum.wixstudio.com/u/rafaelguidapanicali)\
**Post date:** [December 10, 2019, 1:52am UTC](https://forum.wixstudio.com/t/how-to-open-link-new-page-in-wix-code/19732/9 "2019-12-10T01:52:28Z")

</div>

Thank you so much!

---

<div class="post-metadata">

**Author:** ![tech-zengrub](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/tech-zengrub/32/21400_2.png) [@tech-zengrub](https://forum.wixstudio.com/u/tech-zengrub)\
**Post date:** [June 25, 2022, 6:48am UTC](https://forum.wixstudio.com/t/how-to-open-link-new-page-in-wix-code/19732/10 "2022-06-25T06:48:50Z")

</div>

Hi Roi, I have a doubt in this. In my case, I need the navigation to be done to an another external link. Like when the value of bookingRadioGroup is multiCity, and the button submit is clicked, I want it to be navigated to [www.wix.com](http://www.wix.com) in a separate tab. Kindly help me in this regard. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![user2618](https://avatars.discourse-cdn.com/v4/letter/u/f17d59/32.png) [@user2618](https://forum.wixstudio.com/u/user2618)\
**Post date:** [July 1, 2024, 3:04pm UTC](https://forum.wixstudio.com/t/how-to-open-link-new-page-in-wix-code/19732/11 "2024-07-01T15:04:18Z")

</div>

I also need a way to open a new internet tap with a given url link. Is there an easy way to do this?
