Coding issues??



  • Hello,
    I'm not able to run my code while publishing it on the main page, it only runs on preview, I haven't been able to figure out what's going on, I wrote the following code in the "Site Code section":

    import wixData from 'wix-data';

    $w.onReady(function () {
    wixData.query("RbeDatabase")
    .count()
    .then((num) => {
    var numberOfItems = new String(num);
    $w("#conteo").text = numberOfItems.valueOf();
    })
    .catch((error) => {
    let errorMsg = error.message;
    let code = error.code;

    	});
    

    });

    What am I supposed to do in order to run it in the main website???
    I tried searching from Covoco but I couldn't find anything about it ! Is it possible to transfer money to other accounts? I will be greatful if you point me in the right direction.

    Any help wll be appreciated.
    Thank you


Log in to reply

Looks like your connection to Coding issues?? was lost, please wait while we try to reconnect.