title: Bookmarklet to actually click on checkboxes?
body: <p>I have a page where on one side I have several different objects and on the other a checkbox grid, the same for everyone, but values are customized for each object. <br>Obj A can have box 1 selected and 2 unselected, <br>Obj B can have box 1 unselected and 2 selected <br>but the Grid scheme itself is the same for all the objects.<br><br>
  I need to be able to copy the checkboxes values from one specific object onto another object and save my work on server side.<br>
  I created a pure JS bookmarklet that saves into the sessionStorage the actual values of 'checked' of a Checkbox Grid:</p>
  <pre><code>javascript: var test = []; 
     var check = document.getElementsByClassName(&quot;CheckboxGrid&quot;);  
     for (var i = 0; i &lt; check.length; i++)   {    
                        test.push(check[i].checked);}  
     sessionStorage.setItem('val', JSON.stringify(test));
  </code></pre>
  <p>And a second bookmarklet that I use on the same page to copy the values of the Checkbox Grid:</p>
  <pre><code>javascript: var gridValues = sessionStorage.getItem('val'); //returns an array of Char
     var i = 0; 
     var y = 0; 
     var checkboxes = document.getElementsByClassName(&quot;CheckboxGrid&quot;);
  
     while (y&lt;checkboxes.length) 
     {     
          if (gridValues[i] == 't')
                       {checkboxes[y].checked=true; y++; i++;}
          else if (gridValues[i] == 'f')
                       {checkboxes[y].checked=false; y++; i++;}
          else     {i++;}
     }
  </code></pre>
  <p>The code 'works', meaning that on the screen I see the exact copy of the first Grid on the second one; the problem is that it looks like the 2nd bookmarklet is just changing the 'look' of the boxes, and not actually manipulating them.<br>
  In fact, when I save or click on a checkbox everything goes back as it was before bookmarklets actions.</p>
  <p>Am I doing something wrong? Is it actually possible to have a bookmarklet click on a checkbox and keep its changes on the page even after later user-input (e.g. clicking on another box)?</p>
  <p>Thanks to all</p>