How can I redirect to a website on new tab from links setup to a dropdown menu

import wixLocation from ‘wix-location’ ;

$w . onReady ( function () {

$w ( "#dropdown1" ). options  = [ 
 { "label" :  "Youtube Channel" ,  "value" :  "" }, 
 { "label" :  "Gaming Profile" ,  "value" :  "" }, 
 { "label" :  "Minecraft (Hypixel)" ,  "value" :  "" }, 
 { "label" :  "Github" ,  "value" : "" }, 
 { "label" :  "Fiverr" ,  "value" : "" } 



export function dropdown1_change ( event ) {
let gotourl = $w ( “#dropdown1” ). value ;
wixLocation . to ( gotourl );

so this is the code I used for a dropdown menu which redirects to urls from clicking on a dropdown menu but they open on the same tab in which my website rather than in a new tab

but i want to redirect the urls to a new tab, any way to fix that please tell me D:

I think → you won’t be able to do your wished redirection directly from dropdown. Instead add an additional button, which will appear and loaded with the right URL. Now you would be able to open your loaded link of the button in a new TAB…$w/button/link


no i am not a game developer, but still i cant understand that how can i use the specific value of a dropdown to redirect to a url on a new page

Check it out here.$w/button/target

@thisisarcbs as Ninja said, it can’t be done using
Only with a button or a text link (as you can’t link a drop-down option in Wix).

Solutions (each of the followings):

  1. Create a dropdown in an iframe (aka site widget) (see code below).

  2. Create a dropdown in a custom element.

  3. Instead of using a real dropdown, put a box with the options as buttons , design it as if it was a dropdown, and set the target to be _blank.
    Code for iframe:

<!doctype html>
  <select name="myoptions" id="myoptions" onChange=", '_blank')">
    <option value="">Youtube Channel</option>
  <option value="">Gaming Profile</option>

See also: