I’m having trouble with
I wrote a script to allow button dropdown items to link to URL and it works fine (https://www.littlecrabastrology.com/copyhome). On another page I created the exact same scrip modifying the ID associated with the dropdown button (see https://www.littlecrabastrology.com/little-crab-book-3 - MEDIA button). However this one does not work. See scripts below. Any help will be greatly appreciated.
Working in
Wix Studio Editor, Wix Editor
Site link
If this is happening on a site, include a live or test site link
What I’m trying to do
Linking Dropdown items to a URL using Wix Studio
What I’ve tried so far
Script (not working):
// Velo API Reference: Velo Docs
import wixLocation from ‘wix-location’;
$w.onReady(function () {
$w("#media").options = [
{ "label": "PRESS RELEASE", "value": "https://www.npr.org" },
{ "label": "SELL SHEET", "value": "https://www.espn.com" }
];
});
export function media_change(event) {
let gotoURl = $w(“media”).value;
wixLocation.to(gotoURl);
}
Script works
// Velo API Reference: Velo Docs
import wixLocation from ‘wix-location’;
$w.onReady(function () {
$w("#purchasebks1").options = [
{ "label": "New! Direct Ordering - Book 1", "value": "https://shop.ingramspark.com/b/084?p3t4JgKn1oY5j9g4WpoyJzX2IT0R4Ku3iaNBL4CCbVA" },
{ "label": "New! Direct Ordering - Book 2", "value": "https://shop.ingramspark.com/b/084?Ce6gDIz6S2OtKIBDYw40akJkWdL58fpcgBdBEO2wZXu" }
//{ "label": "Amazon", "value": "https://www.amazon.com/dp/B0C2JFPKWG?binding=hardcover&ref=dbs_m_mng_rwt_sft_thcv_tkin" }
];
});
export function purchasebks1_change(event) {
let gotoURl = $w(“#purchasebks1”).value;
wixLocation.to(gotoURl);
}
Extra context
Anything else that might help - edge cases, screenshots, etc.




