try to do checkbox1.checked === true || checkbox2.checked === true || checkbox3.checked === true
hope that works?
try to do checkbox1.checked === true || checkbox2.checked === true || checkbox3.checked === true
hope that works?
i try it in the morning…
sorry i think my mind is going crazy with my own program i’m trying to make
just passed the 2K lines of code😅
All elements have to be $w(“#element”)
so the checkbox1 , checkbox2, checkbox3
has to be $w(“#checkbox1”)
then yo should have this
$w(“#checkbox1”).checked === true || $w(“#checkbox2”).checked === true|| $w(“#checkbox3”).checked === true)
kristof.
you stil have to put it in an if statement
if( $w(" #checkbox1 “).checked === true || $w(” #checkbox2 “).checked === true|| $w(” #checkbox3 ").checked === true) {
you forgot an ( behind if
if ( $w("#ch…
other error
Parsing error: ‘import’ and ‘export’ may only appear at the top level
function checkboxcheck() {
if ( $w("#checkbox1").checked === true || $w("#checkbox2").checked === true || $w("#checkbox3").checked === true){
//add what to do if 1 of those checkboxes is checked
$w("#button1").enable()
//you can also use .expand()
} else {
//add what to do if none is selected
$w("#button1").disable()
//you can also use .collapse()
}
export function checkbox1_change(event) {
link=$w("#checkbox1").value
checkcheckboxes()
}
under this line
//you can also use .collapse()
add another }
this should be the code
function checkboxcheck() {
if ( $w("#checkbox1").checked === true || $w("#checkbox2").checked === true || $w("#checkbox3").checked === true){
//add what to do if 1 of those checkboxes is checked
$w("#button1").enable()
//you can also use .expand()
} else {
//add what to do if none is selected
$w("#button1").disable()
//you can also use .collapse()
}
}
export function checkbox1_change(event) {
link=$w("#checkbox1").value
checkcheckboxes()
}
END of discussion… This is the finish Script… Thank You Kristof Volkaerts for your help
// Für volle die API-Dokumentation, einschließlich Codebeispiele, besuchen Sie http://wix.to/94BuAAs
import wixLocation from 'wix-location';
let link;
function checkcheckboxes() {
if ( $w("#checkbox1").checked || $w("#checkbox2").checked || $w("#checkbox3").checked
||$w("#checkbox4").checked || $w("#checkbox5").checked || $w("#checkbox6").checked
|| $w("#checkbox7").checked || $w("#checkbox8").checked || $w("#checkbox9").checked
|| $w("#checkbox10").checked || $w("#checkbox11").checked || $w("#checkbox12").checked ){
//add what to do if 1 of those checkboxes is checked
$w("#button1").enable()
//you can also use .expand()
} else {
//add what to do if none is selected
$w("#button1").disable()
//you can also use .collapse()
}
}
export function checkbox1_change(event) {
link=$w("#checkbox1").value
checkcheckboxes()
}
export function checkbox2_change(event) {
link=$w("#checkbox2").value
checkcheckboxes()
}
export function checkbox3_change(event) {
link=$w("#checkbox3").value
checkcheckboxes()
}
export function button1_click(event) {
wixLocation.to("https://www.Yourdomain.com/" +link)
}
//
let link2;
function checkcheckboxes1() {
if ($w("#checkbox4").checked || $w("#checkbox5").checked || $w("#checkbox6").checked
|| $w("#checkbox7").checked || $w("#checkbox8").checked || $w("#checkbox9").checked
|| $w("#checkbox10").checked || $w("#checkbox11").checked || $w("#checkbox12").checked ){
//add what to do if 1 of those checkboxes is checked
$w("#button2").enable()
//you can also use .expand()
} else {
//add what to do if none is selected
$w("#button2").disable()
//you can also use .collapse()
}
}
export function checkbox4_change(event) {
link2=$w("#checkbox4").value
checkcheckboxes1()
}
export function checkbox5_change(event) {
link2=$w("#checkbox5").value
checkcheckboxes1()
}
export function checkbox6_change_1(event) {
link2=$w("#checkbox6").value
checkcheckboxes1()
}
export function button2_click(event) {
wixLocation.to("https://www.yourdomain.com/" +link2)
}
//
let link3;
function checkcheckboxes2() {
if ( $w("#checkbox7").checked || $w("#checkbox8").checked || $w("#checkbox9").checked
|| $w("#checkbox10").checked || $w("#checkbox11").checked || $w("#checkbox12").checked ){
//add what to do if 1 of those checkboxes is checked
$w("#button3").enable()
//you can also use .expand()
} else {
//add what to do if none is selected
$w("#button3").disable()
//you can also use .collapse()
}
}
export function checkbox9_change(event) {
link3=$w("#checkbox9").value
checkcheckboxes2()
}
export function checkbox8_change(event) {
link3=$w("#checkbox8").value
checkcheckboxes2()
}
export function checkbox7_change(event) {
link3=$w("#checkbox7").value
checkcheckboxes2()
}
export function button3_click(event) {
wixLocation.to("https://www.yourdomain.com/" +link3)
}
//
let link4;
function checkcheckboxes3() {
if ( $w("#checkbox10").checked || $w("#checkbox11").checked || $w("#checkbox12").checked ){
//add what to do if 1 of those checkboxes is checked
$w("#button4").enable()
//you can also use .expand()
} else {
//add what to do if none is selected
$w("#button4").disable()
//you can also use .collapse()
}
}
export function checkbox10_change(event) {
link4=$w("#checkbox10").value
checkcheckboxes3()
}
export function checkbox11_change(event) {
link4=$w("#checkbox11").value
checkcheckboxes3()
}
export function checkbox12_change(event) {
link4=$w("#checkbox12").value
checkcheckboxes3()
}
export function button4_click(event) {
wixLocation.to("https://www.yourdomain.com/" +link4)
}
$w.onReady(function () {
});