You are reading a single comment by @user92178 and its replies. Click here to read the full conversation.
  • http://www.espruino.com/Posting+Forms
    the original file will by default render the checkbox unchecked. so what I am trying to figure out is if I make a change to the code so that I create a global variable that contains the value that postDATA contains, and I change the HTML code so that the checkbox will follow the value of the postDATA, I would expect this to happen: I connect to the Espruino over wifi. the webpage is loaded (with checkbox unchecked). I click the checkbox so it becomes checked. I click the Submit button, and take the postDATA information that contains the information that the checkbox is checked, and I store this information in a global variable. then - because I modified the HTML so that the page that is loaded now contains a checked checkbox - I would expect that the checkbox would remain checked, but it does not. So I am scratching my head trying to understand why I basically have to repeat the Submit twice (and click the checkbox twice) to make the checkbox stay checked... sorry if my explanation is confusing. I should try to share the code. The main difference from the example code is that I store checkbox status in a variable, and I change the HTML so that the page that is loaded will reflect the status of the variable. I just cannot understand why the second time the page is loaded into the browser, it shows the original unchecked status, not the checked status that the variable contains. it takes a second try (third loading of the HTML) to make the checkbox remain checked.

About

Avatar for user92178 @user92178 started