here is my code…
import wixUsers from ‘wix-users’;
import wixLocation from ‘wix-location’;
$w.onReady(function () {
$w(’ #registerbutton ‘).onClick(function () {
let email = $w(’ #email ‘).value;
let password = $w(’ #password ‘).value;
wixUsers.register(email, password)
.then(() => {
wixLocation.to (’/testing’);
})
})
})
export function ps4checkbox_click_1(event) {
" #PS4 "();
}
export function pccheckbox_click_1(event) {
" #PC "();
}
export function xboxcheckbox_click(event) {
" #XBOX “();
}
export function nintendoswitchcheckbox_click(event) {
“NintendoSwitch”();
}
export function mobilecheckbox_click(event) {
“Mobile”();
}
function pccheckbox() {
if ($w(” #pccheckbox “).value === ‘’) { $w(” #pccheckbox “).value = ‘PC’; } else { $w(” #pccheckbox “).value = ‘’; }
if ($w(” #ps4checkbox “).value === ‘’) { $w(” #ps4checkbox “).value = ‘PS4’; } else { $w(” #ps4checkbox “).value = ‘’; }
if ($w(” #xboxcheckbox “).value === ‘’) { $w(” #xboxcheckbox “).value = ‘XBOX’; } else { $w(” #xboxcheckbox “).value = ‘’; }
if ($w(” #nintendoswitchcheckbox “).value === ‘’) { $w(” #nintendoswitchcheckbox “).value = ‘NintendoSwitch’; } else { $w(” #nintendoswitchcheckbox “).value = ‘’; }
if ($w(” #mobilecheckbox “).value === ‘’) { $w(” #mobilecheckbox “).value = ‘Mobile’; } else { $w(” #mobilecheckbox “).value = ‘’; }
function valueCombine() {
let checkedValue = $w(” #pccheckbox “).value + " " + $w(” #ps4checkbox “).value + " " + $w(” #xboxcheckbox “).value + " " + $w(” #nintendoswitchcheckbox “).value + " " + $w(” #mobilecheckbox “).value;
$w(” #testValue ").value = checkedValue;}
}
export function registerbutton_mouseIn() {
valueCombine();
}
Here is my error message: Loading the code for the Registration popup. To debug this code, open f5sse.js in Developer Tools. There was an error in your script. The element selector function (usually $w) cannot be used before the page is ready
any help?? or ideas?