title: reload page once hidden value has been set
body: <p>How do I make a page reload once a hidden input field has been set?</p>
  
  <p>This is my field:</p>
  
  <pre><code>&lt;input id="fieldID" type="hidden" value=""&gt;
  </code></pre>
  
  <p>Thanks for your help.</p>
  
  <p>Here is my intire script including the proposed answer.</p>
  
  <p>It currently doesn't work but I have a feeling that more due to a missing parenthesis or something like that.</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
      $(document).ready(function() {          
          setTimeout(function() {
              $('#notification').fadeOut('fast');
          }, 3000);
  
  
          $('#fieldID').on('change', function(){
              window.location.reload();
          });
  
  
          $('.iframe-btn').fancybox({
          'width' : 880,
          'height'    : 570,
          'type'  : 'iframe',
          'autoScale'   : false
          });
          $('#download-button').on('click', function() {
            ga('send', 'event', 'button', 'click', 'download-buttons');      
          });
          $('.toggle').click(function(){
            var _this=$(this);
            $('#'+_this.data('ref')).toggle(200);
            var i=_this.find('i');
            if (i.hasClass('icon-plus')) {
              i.removeClass('icon-plus');
              i.addClass('icon-minus');
            }else{
              i.removeClass('icon-minus');
              i.addClass('icon-plus');
            }
          });
      });
  
          tinymce.init({
                  language : 'sv_SE',
                  selector: "textarea",theme: "modern",
                  plugins: [
                      "advlist autolink link image lists charmap print preview hr anchor pagebreak",
                      "searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
                      "table contextmenu directionality emoticons paste textcolor responsivefilemanager",
                      "link",
                  ],
                  link_list: [  
                      &lt;?                          
                          $sql="select * from pages order by position";
                          $rs=mysql_query($sql, $conn);
  
                          while($row=mysql_fetch_array($rs)){
                              $tmp_header=$row["header"];
                              $tmp_id=$row["id"];
                              if($row["position"] == "0") {
                                  echo("{title: '".$tmp_header."', value: '?&amp;page_id=1'},");
                              }
                              else if($row["position"] !== "-1") {
                                  echo("{title: '".$tmp_header."', value: '?&amp;page_id=".$tmp_id."'},");    
                              }
                          }
                          $sql="select * from pages order by position";
                          $rs=mysql_query($sql, $conn);
  
                          while($row=mysql_fetch_array($rs)){
                              $tmp_header=$row["header"];
                              $tmp_id=$row["id"];
                              if($row["position"] == "-1") {
                                  echo("{title: '".$tmp_header."', value: '?&amp;page_id=".$tmp_id."'},");
                              }
                          }
                      ?&gt;
                      ],
  
                 toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright | bullist numlist outdent indent | link image responsivefilemanager table",
                 image_advtab: false, 
                 menubar: false,
  
                 external_filemanager_path:"js/filemanager/",
                 filemanager_title:"Responsive Filemanager" ,
                 external_plugins: { "filemanager" : "/website/js/filemanager/plugin.min.js"}
              });
  
  &lt;/script&gt;
  </code></pre>