Event handler problem when feeding HTML chart via wix codeHow to find event listeners on a DOM node when debugging or from the JavaScript code?Zingchart click event handlingAngularjs: Sum array elements for chartsMultiple Google Charts in for each loopAurelia: How to detect or register callback for when custom element is loaded and ready to interface withChartjs.org Chart only displaying in one pageChart.js 2.7.0 Grouped Horizontal Bar Chart, how to get tooltip to display data for one bar, not whole group?Problems with javascript event handlerProblem in making chart with Chart.js in wix?Chart.js on wix issue: final result doesn't match data sent via Postmessage

IP addresses from public IP block in my LAN

Are pressure-treated posts that have been submerged for a few days ruined?

How do LIGO and VIRGO know that a gravitational wave has its origin in a neutron star or a black hole?

Will 700 more planes a day fly because of the Heathrow expansion?

How does this change to the opportunity attack rule impact combat?

How can I roleplay a follower-type character when I as a player have a leader-type personality?

Should homeowners insurance cover the cost of the home?

Point of the Dothraki's attack in GoT S8E3?

What if the end-user didn't have the required library?

Can I use a fetch land to shuffle my deck while the opponent has Ashiok, Dream Render in play?

Would glacier 'trees' be plausible?

Mindfulness of Action versus Perception

Where can I go to avoid planes overhead?

What exactly are the `size issues' preventing formation of presheaves being a left adjoint to some forgetful functor?

Should I mention being denied entry to UK due to a confusion in my Visa and Ticket bookings?

Is there an idiom that support the idea that "inflation is bad"?

SafeCracker #3 - We've Been Blocked

Why are UK Bank Holidays on Mondays?

Wrong answer from DSolve when solving a differential equation

Copy previous line to current line from text file

How do inspiraling black holes get closer?

Adjacent DEM color matching in QGIS

What to use instead of cling film to wrap pastry

Can there be a single technologically advanced nation, in a continent full of non-technologically advanced nations?



Event handler problem when feeding HTML chart via wix code


How to find event listeners on a DOM node when debugging or from the JavaScript code?Zingchart click event handlingAngularjs: Sum array elements for chartsMultiple Google Charts in for each loopAurelia: How to detect or register callback for when custom element is loaded and ready to interface withChartjs.org Chart only displaying in one pageChart.js 2.7.0 Grouped Horizontal Bar Chart, how to get tooltip to display data for one bar, not whole group?Problems with javascript event handlerProblem in making chart with Chart.js in wix?Chart.js on wix issue: final result doesn't match data sent via Postmessage






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I'm feeding an HTML element (pie chart) on a wix page. I pull data from local storage for 7 variables and pass the information to the HTML element via Postmessage.



My code works fine when it's part of a button (export function). However I would like to trigger the event from the onReady function (i.e. when the page is loaded). I use the exact same code but it simply doesn't work with the OnReady function (i.e. I'm unable to trigger the event programatically).



Wix pagecode for Export Function with button (works fine):



export function button1_click(event) 
var data = [introdeo, intcalypso, intbalthazar, intluna, intkiara, intmistral, intsaya];
console.log(data);
var labels = ["Rodeo", "Calypso", "Balthazar", "Luna", "Kiara", "Mistral", "Saya"];
let info = data:data, labels:labels;
$w("#html1").postMessage(info);



Wix pagecode for onReady function (doesn't work):



$w.onReady(function () 
var data = [introdeo, intcalypso, intbalthazar, intluna, intkiara, intmistral, intsaya];
var labels = ["Rodeo", "Calypso", "Balthazar", "Luna", "Kiara", "Mistral", "Saya"];
let info = data:data, labels:labels;
$w("#html1").postMessage(info);

);


HTML code (the chart code in the HTML element on wix page):



<!DOCTYPE html>
<html lang="en-US">
<body>


<canvas id="myChart"></canvas>

<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>

<script type="text/javascript">


var ctx = document.getElementById('myChart').getContext('2d');
var myPieChart = new Chart(ctx,
type: 'pie',
data:
labels:[],
datasets: [
data: [],
backgroundColor: ["#f97a03", "#52aff0", "#35a11d", "#f052e4", "#853fc2", "#f0f712", "#092978"],
]
,
options:
);

window.onmessage = function(event)
myPieChart.data.datasets[0].data = event.data.data;
myPieChart.data.labels = event.data.labels;
myPieChart.update();
;

</script>

</body>
</html>


With the button Export function, I get an updated pie chart on my web page. With the OnReady code, I get a blank space in the HTML element.










share|improve this question




























    0















    I'm feeding an HTML element (pie chart) on a wix page. I pull data from local storage for 7 variables and pass the information to the HTML element via Postmessage.



    My code works fine when it's part of a button (export function). However I would like to trigger the event from the onReady function (i.e. when the page is loaded). I use the exact same code but it simply doesn't work with the OnReady function (i.e. I'm unable to trigger the event programatically).



    Wix pagecode for Export Function with button (works fine):



    export function button1_click(event) 
    var data = [introdeo, intcalypso, intbalthazar, intluna, intkiara, intmistral, intsaya];
    console.log(data);
    var labels = ["Rodeo", "Calypso", "Balthazar", "Luna", "Kiara", "Mistral", "Saya"];
    let info = data:data, labels:labels;
    $w("#html1").postMessage(info);



    Wix pagecode for onReady function (doesn't work):



    $w.onReady(function () 
    var data = [introdeo, intcalypso, intbalthazar, intluna, intkiara, intmistral, intsaya];
    var labels = ["Rodeo", "Calypso", "Balthazar", "Luna", "Kiara", "Mistral", "Saya"];
    let info = data:data, labels:labels;
    $w("#html1").postMessage(info);

    );


    HTML code (the chart code in the HTML element on wix page):



    <!DOCTYPE html>
    <html lang="en-US">
    <body>


    <canvas id="myChart"></canvas>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>

    <script type="text/javascript">


    var ctx = document.getElementById('myChart').getContext('2d');
    var myPieChart = new Chart(ctx,
    type: 'pie',
    data:
    labels:[],
    datasets: [
    data: [],
    backgroundColor: ["#f97a03", "#52aff0", "#35a11d", "#f052e4", "#853fc2", "#f0f712", "#092978"],
    ]
    ,
    options:
    );

    window.onmessage = function(event)
    myPieChart.data.datasets[0].data = event.data.data;
    myPieChart.data.labels = event.data.labels;
    myPieChart.update();
    ;

    </script>

    </body>
    </html>


    With the button Export function, I get an updated pie chart on my web page. With the OnReady code, I get a blank space in the HTML element.










    share|improve this question
























      0












      0








      0








      I'm feeding an HTML element (pie chart) on a wix page. I pull data from local storage for 7 variables and pass the information to the HTML element via Postmessage.



      My code works fine when it's part of a button (export function). However I would like to trigger the event from the onReady function (i.e. when the page is loaded). I use the exact same code but it simply doesn't work with the OnReady function (i.e. I'm unable to trigger the event programatically).



      Wix pagecode for Export Function with button (works fine):



      export function button1_click(event) 
      var data = [introdeo, intcalypso, intbalthazar, intluna, intkiara, intmistral, intsaya];
      console.log(data);
      var labels = ["Rodeo", "Calypso", "Balthazar", "Luna", "Kiara", "Mistral", "Saya"];
      let info = data:data, labels:labels;
      $w("#html1").postMessage(info);



      Wix pagecode for onReady function (doesn't work):



      $w.onReady(function () 
      var data = [introdeo, intcalypso, intbalthazar, intluna, intkiara, intmistral, intsaya];
      var labels = ["Rodeo", "Calypso", "Balthazar", "Luna", "Kiara", "Mistral", "Saya"];
      let info = data:data, labels:labels;
      $w("#html1").postMessage(info);

      );


      HTML code (the chart code in the HTML element on wix page):



      <!DOCTYPE html>
      <html lang="en-US">
      <body>


      <canvas id="myChart"></canvas>

      <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>

      <script type="text/javascript">


      var ctx = document.getElementById('myChart').getContext('2d');
      var myPieChart = new Chart(ctx,
      type: 'pie',
      data:
      labels:[],
      datasets: [
      data: [],
      backgroundColor: ["#f97a03", "#52aff0", "#35a11d", "#f052e4", "#853fc2", "#f0f712", "#092978"],
      ]
      ,
      options:
      );

      window.onmessage = function(event)
      myPieChart.data.datasets[0].data = event.data.data;
      myPieChart.data.labels = event.data.labels;
      myPieChart.update();
      ;

      </script>

      </body>
      </html>


      With the button Export function, I get an updated pie chart on my web page. With the OnReady code, I get a blank space in the HTML element.










      share|improve this question














      I'm feeding an HTML element (pie chart) on a wix page. I pull data from local storage for 7 variables and pass the information to the HTML element via Postmessage.



      My code works fine when it's part of a button (export function). However I would like to trigger the event from the onReady function (i.e. when the page is loaded). I use the exact same code but it simply doesn't work with the OnReady function (i.e. I'm unable to trigger the event programatically).



      Wix pagecode for Export Function with button (works fine):



      export function button1_click(event) 
      var data = [introdeo, intcalypso, intbalthazar, intluna, intkiara, intmistral, intsaya];
      console.log(data);
      var labels = ["Rodeo", "Calypso", "Balthazar", "Luna", "Kiara", "Mistral", "Saya"];
      let info = data:data, labels:labels;
      $w("#html1").postMessage(info);



      Wix pagecode for onReady function (doesn't work):



      $w.onReady(function () 
      var data = [introdeo, intcalypso, intbalthazar, intluna, intkiara, intmistral, intsaya];
      var labels = ["Rodeo", "Calypso", "Balthazar", "Luna", "Kiara", "Mistral", "Saya"];
      let info = data:data, labels:labels;
      $w("#html1").postMessage(info);

      );


      HTML code (the chart code in the HTML element on wix page):



      <!DOCTYPE html>
      <html lang="en-US">
      <body>


      <canvas id="myChart"></canvas>

      <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>

      <script type="text/javascript">


      var ctx = document.getElementById('myChart').getContext('2d');
      var myPieChart = new Chart(ctx,
      type: 'pie',
      data:
      labels:[],
      datasets: [
      data: [],
      backgroundColor: ["#f97a03", "#52aff0", "#35a11d", "#f052e4", "#853fc2", "#f0f712", "#092978"],
      ]
      ,
      options:
      );

      window.onmessage = function(event)
      myPieChart.data.datasets[0].data = event.data.data;
      myPieChart.data.labels = event.data.labels;
      myPieChart.update();
      ;

      </script>

      </body>
      </html>


      With the button Export function, I get an updated pie chart on my web page. With the OnReady code, I get a blank space in the HTML element.







      javascript charts eventhandler wixcode






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 22 at 23:21









      PeterpiperPeterpiper

      21




      21






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Seems like the html element might not be ready to receive that POST. Try wrapping $w("#html1").postMessage(info); in a setTimeout.



          $w.onReady(function () 
          var data = [introdeo, intcalypso, intbalthazar, intluna, intkiara, intmistral, intsaya];
          var labels = ["Rodeo", "Calypso", "Balthazar", "Luna", "Kiara", "Mistral", "Saya"];
          let info = data:data, labels:labels;
          setTimeout(function()
          $w("#html1").postMessage(info);
          , 1000)
          );





          share|improve this answer

























          • I tried it and it worked initially. Then I published the change, and it doesn't work anymore. When I click "preview", I briefly see the chart, and then it's gone. Also there is a difference between the preview mode and the live website. On the live website, my function button brigns the chart but with the wrong values. There is something wrong with either my Page code or HTML code or both!

            – Peterpiper
            Mar 23 at 0:30











          • Tough for me to say without knowing all the code you have in there...but for me all I did was take your code, paste it in, wrap the set timeout and it worked as expected. In preview mode and after publish

            – scottjustin5000
            Mar 23 at 0:37












          • I changed to 2000 milliseconds and it works! However... I get Calypso 0, Balthazar 5, Luna 1, Kiara 4, Mistral 2, Rodeo 8 and Saya 4 in Preview mode (which is correct) and Calypso 3, Balthazar 4, Luna 3, Kiara 6, Mistral 4, Rodeo 3 and Saya 0 on the live website, which is incorrect! How is that possible? thanks,

            – Peterpiper
            Mar 23 at 0:39











          • You're getting the variables from local storage, they could be different between the two environments...tough for me know without knowing how they are set, etc. When you were using your button approach I am assuming the data was as expected?

            – scottjustin5000
            Mar 23 at 0:49











          • Also--as a side note--you are in race condition with the setTimeout approach...2 seconds might always work out, but there might be a time when it doesn't. ideally onReady would not fire until your iFrame was ready.

            – scottjustin5000
            Mar 23 at 0:49











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55309002%2fevent-handler-problem-when-feeding-html-chart-via-wix-code%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Seems like the html element might not be ready to receive that POST. Try wrapping $w("#html1").postMessage(info); in a setTimeout.



          $w.onReady(function () 
          var data = [introdeo, intcalypso, intbalthazar, intluna, intkiara, intmistral, intsaya];
          var labels = ["Rodeo", "Calypso", "Balthazar", "Luna", "Kiara", "Mistral", "Saya"];
          let info = data:data, labels:labels;
          setTimeout(function()
          $w("#html1").postMessage(info);
          , 1000)
          );





          share|improve this answer

























          • I tried it and it worked initially. Then I published the change, and it doesn't work anymore. When I click "preview", I briefly see the chart, and then it's gone. Also there is a difference between the preview mode and the live website. On the live website, my function button brigns the chart but with the wrong values. There is something wrong with either my Page code or HTML code or both!

            – Peterpiper
            Mar 23 at 0:30











          • Tough for me to say without knowing all the code you have in there...but for me all I did was take your code, paste it in, wrap the set timeout and it worked as expected. In preview mode and after publish

            – scottjustin5000
            Mar 23 at 0:37












          • I changed to 2000 milliseconds and it works! However... I get Calypso 0, Balthazar 5, Luna 1, Kiara 4, Mistral 2, Rodeo 8 and Saya 4 in Preview mode (which is correct) and Calypso 3, Balthazar 4, Luna 3, Kiara 6, Mistral 4, Rodeo 3 and Saya 0 on the live website, which is incorrect! How is that possible? thanks,

            – Peterpiper
            Mar 23 at 0:39











          • You're getting the variables from local storage, they could be different between the two environments...tough for me know without knowing how they are set, etc. When you were using your button approach I am assuming the data was as expected?

            – scottjustin5000
            Mar 23 at 0:49











          • Also--as a side note--you are in race condition with the setTimeout approach...2 seconds might always work out, but there might be a time when it doesn't. ideally onReady would not fire until your iFrame was ready.

            – scottjustin5000
            Mar 23 at 0:49















          0














          Seems like the html element might not be ready to receive that POST. Try wrapping $w("#html1").postMessage(info); in a setTimeout.



          $w.onReady(function () 
          var data = [introdeo, intcalypso, intbalthazar, intluna, intkiara, intmistral, intsaya];
          var labels = ["Rodeo", "Calypso", "Balthazar", "Luna", "Kiara", "Mistral", "Saya"];
          let info = data:data, labels:labels;
          setTimeout(function()
          $w("#html1").postMessage(info);
          , 1000)
          );





          share|improve this answer

























          • I tried it and it worked initially. Then I published the change, and it doesn't work anymore. When I click "preview", I briefly see the chart, and then it's gone. Also there is a difference between the preview mode and the live website. On the live website, my function button brigns the chart but with the wrong values. There is something wrong with either my Page code or HTML code or both!

            – Peterpiper
            Mar 23 at 0:30











          • Tough for me to say without knowing all the code you have in there...but for me all I did was take your code, paste it in, wrap the set timeout and it worked as expected. In preview mode and after publish

            – scottjustin5000
            Mar 23 at 0:37












          • I changed to 2000 milliseconds and it works! However... I get Calypso 0, Balthazar 5, Luna 1, Kiara 4, Mistral 2, Rodeo 8 and Saya 4 in Preview mode (which is correct) and Calypso 3, Balthazar 4, Luna 3, Kiara 6, Mistral 4, Rodeo 3 and Saya 0 on the live website, which is incorrect! How is that possible? thanks,

            – Peterpiper
            Mar 23 at 0:39











          • You're getting the variables from local storage, they could be different between the two environments...tough for me know without knowing how they are set, etc. When you were using your button approach I am assuming the data was as expected?

            – scottjustin5000
            Mar 23 at 0:49











          • Also--as a side note--you are in race condition with the setTimeout approach...2 seconds might always work out, but there might be a time when it doesn't. ideally onReady would not fire until your iFrame was ready.

            – scottjustin5000
            Mar 23 at 0:49













          0












          0








          0







          Seems like the html element might not be ready to receive that POST. Try wrapping $w("#html1").postMessage(info); in a setTimeout.



          $w.onReady(function () 
          var data = [introdeo, intcalypso, intbalthazar, intluna, intkiara, intmistral, intsaya];
          var labels = ["Rodeo", "Calypso", "Balthazar", "Luna", "Kiara", "Mistral", "Saya"];
          let info = data:data, labels:labels;
          setTimeout(function()
          $w("#html1").postMessage(info);
          , 1000)
          );





          share|improve this answer















          Seems like the html element might not be ready to receive that POST. Try wrapping $w("#html1").postMessage(info); in a setTimeout.



          $w.onReady(function () 
          var data = [introdeo, intcalypso, intbalthazar, intluna, intkiara, intmistral, intsaya];
          var labels = ["Rodeo", "Calypso", "Balthazar", "Luna", "Kiara", "Mistral", "Saya"];
          let info = data:data, labels:labels;
          setTimeout(function()
          $w("#html1").postMessage(info);
          , 1000)
          );






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 23 at 0:22

























          answered Mar 23 at 0:15









          scottjustin5000scottjustin5000

          92369




          92369












          • I tried it and it worked initially. Then I published the change, and it doesn't work anymore. When I click "preview", I briefly see the chart, and then it's gone. Also there is a difference between the preview mode and the live website. On the live website, my function button brigns the chart but with the wrong values. There is something wrong with either my Page code or HTML code or both!

            – Peterpiper
            Mar 23 at 0:30











          • Tough for me to say without knowing all the code you have in there...but for me all I did was take your code, paste it in, wrap the set timeout and it worked as expected. In preview mode and after publish

            – scottjustin5000
            Mar 23 at 0:37












          • I changed to 2000 milliseconds and it works! However... I get Calypso 0, Balthazar 5, Luna 1, Kiara 4, Mistral 2, Rodeo 8 and Saya 4 in Preview mode (which is correct) and Calypso 3, Balthazar 4, Luna 3, Kiara 6, Mistral 4, Rodeo 3 and Saya 0 on the live website, which is incorrect! How is that possible? thanks,

            – Peterpiper
            Mar 23 at 0:39











          • You're getting the variables from local storage, they could be different between the two environments...tough for me know without knowing how they are set, etc. When you were using your button approach I am assuming the data was as expected?

            – scottjustin5000
            Mar 23 at 0:49











          • Also--as a side note--you are in race condition with the setTimeout approach...2 seconds might always work out, but there might be a time when it doesn't. ideally onReady would not fire until your iFrame was ready.

            – scottjustin5000
            Mar 23 at 0:49

















          • I tried it and it worked initially. Then I published the change, and it doesn't work anymore. When I click "preview", I briefly see the chart, and then it's gone. Also there is a difference between the preview mode and the live website. On the live website, my function button brigns the chart but with the wrong values. There is something wrong with either my Page code or HTML code or both!

            – Peterpiper
            Mar 23 at 0:30











          • Tough for me to say without knowing all the code you have in there...but for me all I did was take your code, paste it in, wrap the set timeout and it worked as expected. In preview mode and after publish

            – scottjustin5000
            Mar 23 at 0:37












          • I changed to 2000 milliseconds and it works! However... I get Calypso 0, Balthazar 5, Luna 1, Kiara 4, Mistral 2, Rodeo 8 and Saya 4 in Preview mode (which is correct) and Calypso 3, Balthazar 4, Luna 3, Kiara 6, Mistral 4, Rodeo 3 and Saya 0 on the live website, which is incorrect! How is that possible? thanks,

            – Peterpiper
            Mar 23 at 0:39











          • You're getting the variables from local storage, they could be different between the two environments...tough for me know without knowing how they are set, etc. When you were using your button approach I am assuming the data was as expected?

            – scottjustin5000
            Mar 23 at 0:49











          • Also--as a side note--you are in race condition with the setTimeout approach...2 seconds might always work out, but there might be a time when it doesn't. ideally onReady would not fire until your iFrame was ready.

            – scottjustin5000
            Mar 23 at 0:49
















          I tried it and it worked initially. Then I published the change, and it doesn't work anymore. When I click "preview", I briefly see the chart, and then it's gone. Also there is a difference between the preview mode and the live website. On the live website, my function button brigns the chart but with the wrong values. There is something wrong with either my Page code or HTML code or both!

          – Peterpiper
          Mar 23 at 0:30





          I tried it and it worked initially. Then I published the change, and it doesn't work anymore. When I click "preview", I briefly see the chart, and then it's gone. Also there is a difference between the preview mode and the live website. On the live website, my function button brigns the chart but with the wrong values. There is something wrong with either my Page code or HTML code or both!

          – Peterpiper
          Mar 23 at 0:30













          Tough for me to say without knowing all the code you have in there...but for me all I did was take your code, paste it in, wrap the set timeout and it worked as expected. In preview mode and after publish

          – scottjustin5000
          Mar 23 at 0:37






          Tough for me to say without knowing all the code you have in there...but for me all I did was take your code, paste it in, wrap the set timeout and it worked as expected. In preview mode and after publish

          – scottjustin5000
          Mar 23 at 0:37














          I changed to 2000 milliseconds and it works! However... I get Calypso 0, Balthazar 5, Luna 1, Kiara 4, Mistral 2, Rodeo 8 and Saya 4 in Preview mode (which is correct) and Calypso 3, Balthazar 4, Luna 3, Kiara 6, Mistral 4, Rodeo 3 and Saya 0 on the live website, which is incorrect! How is that possible? thanks,

          – Peterpiper
          Mar 23 at 0:39





          I changed to 2000 milliseconds and it works! However... I get Calypso 0, Balthazar 5, Luna 1, Kiara 4, Mistral 2, Rodeo 8 and Saya 4 in Preview mode (which is correct) and Calypso 3, Balthazar 4, Luna 3, Kiara 6, Mistral 4, Rodeo 3 and Saya 0 on the live website, which is incorrect! How is that possible? thanks,

          – Peterpiper
          Mar 23 at 0:39













          You're getting the variables from local storage, they could be different between the two environments...tough for me know without knowing how they are set, etc. When you were using your button approach I am assuming the data was as expected?

          – scottjustin5000
          Mar 23 at 0:49





          You're getting the variables from local storage, they could be different between the two environments...tough for me know without knowing how they are set, etc. When you were using your button approach I am assuming the data was as expected?

          – scottjustin5000
          Mar 23 at 0:49













          Also--as a side note--you are in race condition with the setTimeout approach...2 seconds might always work out, but there might be a time when it doesn't. ideally onReady would not fire until your iFrame was ready.

          – scottjustin5000
          Mar 23 at 0:49





          Also--as a side note--you are in race condition with the setTimeout approach...2 seconds might always work out, but there might be a time when it doesn't. ideally onReady would not fire until your iFrame was ready.

          – scottjustin5000
          Mar 23 at 0:49



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55309002%2fevent-handler-problem-when-feeding-html-chart-via-wix-code%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해