title: Why I can't make a jsFiddle of this working code?
body: <p>My code works perfectly on my computer, on all my browsers (including ie), But I can't manage to make it work on <a href="http://jsfiddle.net/" rel="nofollow">jsFiddle</a>.</p>
  
  <p>The problem seems to be on:</p>
  
  <pre><code>    window.onload=function(){
          document.body.innerHTML+=brd+log;
      }
  </code></pre>
  
  <p>But I have tried both with and without the <code>window.onload</code>. I am totally clueless and I am starting to lose all hope</p>
  
  <p>CSS (optional):</p>
  
  <pre><code>        *{margin:0;padding:0;}
          #brd{margin:15px auto;}
          #brd,#brd td,#log{border:1px solid #000;}
          #brd td{height:47px;width:45px;text-align:center;font-size:30px;}
          #brd span{font-size:12px;}
          #log{margin:15px auto;padding:20px;width:385px;max-height:150px;overflow:auto;background:#F0F0F0;color:#000;}
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre><code>        var i,sdk,rem,log,perf,brd,bxes=[["11","12","13","21","22","23","31","32","33"],["14","15","16","24","25","26","34","35","36"],["17","18","19","27","28","29","37","38","39"],["41","42","43","51","52","53","61","62","63"],["44","45","46","54","55","56","64","65","66"],["47","48","49","57","58","59","67","68","69"],["71","72","73","81","82","83","91","92","93"],["74","75","76","84","85","86","94","95","96"],["77","78","79","87","88","89","97","98","99"]];
  
          /*Array Find*/
          function arrFind(fnd,frm,bol){
              var ii,len,rtn=-1;
  
              for(ii=0,len=frm.length;ii&lt;len;ii++){
                  if(frm[ii]==fnd){
                      rtn=ii;
                      break;
                  }
              }
              return bol?rtn&gt;-1:rtn;
          }
  
          /*To RC*/
          function toRC(val){
              var ii,len,aa=[];
  
              val=val.split(",");
  
              for(ii=0,len=val.length;ii&lt;len;ii++){
                  aa.push(Math.ceil((parseInt(val[ii])+1)/9)+""+((parseInt(val[ii])%9)+1));
              }
  
              return aa.join(",");
          }
  
          /*To AV*/
          function toAV(rc){
              var ii,len,aa=[];
  
              rc=rc.split(",");
  
              for(ii=0,len=rc.length;ii&lt;len;ii++){
                  aa.push((((parseInt(rc[ii].charAt(0))-1)*9)+(parseInt(rc[ii].charAt(1))-1))+"");
              }
  
              return aa.join(",");
          }
  
          /*Get Box*/
          function getBox(av,bol){
              var ii,jj,len,ss,zz,aa=[];
  
              if(!bol){
                  av=toRC(av);
              }
  
              av=av.split(",");
  
              for(ii=0,len=av.length;ii&lt;len;ii++){
                  ss=av[ii];
                  for(jj=0;jj&lt;9;jj++){
                      zz=window.bxes[jj];
                      if(arrFind(ss,zz,true)){
                          aa.push(zz);
                          break;
                      }
                  }
              }
  
              return aa.join(",");
          }
  
          /*Get Row*/
          function getRow(av,bol){
              var ii,len,ss,aa=[];
  
              if(!bol){
                  av=toRC(av);
              }
  
              av=av.split(",");
  
              for(ii=0,len=av.length;ii&lt;len;ii++){
                  ss=av[ii].charAt(0);
                  aa.push(ss+"1",ss+"2",ss+"3",ss+"4",ss+"5",ss+"6",ss+"7",ss+"8",ss+"9");
              }
  
              return aa.join(",");
          }
  
          /*Get Column*/
          function getCol(av,bol){
              var ii,len,ss,aa=[];
  
              if(!bol){
                  av=toRC(av);
              }
  
              av=av.split(",");
  
              for(ii=0,len=av.length;ii&lt;len;ii++){
                  ss=av[ii].charAt(1);
                  aa.push("1"+ss,"2"+ss,"3"+ss,"4"+ss,"5"+ss,"6"+ss,"7"+ss,"8"+ss,"9"+ss);
              }
  
              return aa.join(",");
          }
  
          /*Get Value*/
          function getVal(av,bol){
              var ii,len,ss,aa=[];
  
              if(bol){
                  av=toAV(av);
              }
  
              av=av.split(",");
  
              for(ii=0,len=av.length;ii&lt;len;ii++){
                  ss=window.sdk[parseInt(av[ii])];
                  if(ss.length==1){
                      aa.push(ss);
                  }
              }
  
              return aa.join(",");
          }
  
          /*Get Candidates*/
          function getCand(av,bol){
              var ii,len,ss,zz,aa=["1","2","3","4","5","6","7","8","9"];
  
              if(bol){
                  av=toAV(av);
              }
  
              if(window.sdk[parseInt(av)].length==1){
                  return [];
              }
  
              zz=getVal(getBox(av)+","+getRow(av)+","+getCol(av),true).split(",");
  
              for(ii=0,len=zz.length;ii&lt;len;ii++){
                  ss=arrFind(zz[ii],aa);
                  if(ss&gt;-1){
                      aa.splice(ss,1);
                  }
              }
  
              return aa.join(",");
          }
  
          /*New Sudoku*/
          function newSudoku(str){
              var ii,len,ss;
  
              window.perf=new Date().getTime();
              window.log="";
              window.sdk=[];
              window.rem=[];
  
              for(ii=0,len=str.length;ii&lt;len;ii++){
                  ss=str.charAt(ii);
                  if(ss!="0"){
                      window.log+=ss+" on "+toRC(ii+"")+"&lt;br&gt;";
                      writeNumber(ss,ii+"");//wn
                  }else{
                      window.sdk[ii]=[];
                      window.rem.push(ii+"");
                  }
              }
          }
  
          /*Write Number*/
          function writeNumber(val,av,bol){
              if(bol){
                  av=toAV(av);
              }
  
              window.sdk[parseInt(av)]=[val];
              return delCand(val,av);
          }
  
          /*Delete Candidates*/
          function delCand(val,av,bol){
              var ii,jj,len,jen,ss,zz,cc,xx,xo,dd=[];
  
              if(bol){
                  av=toAV(av);
              }
  
              zz=toRC(av);
  
              xx=new RegExp(","+zz+",","g");//below bol
  
              ss=toAV((getBox(av)+","+getRow(av)+","+getCol(av)).replace(xx,",").replace(zz+",","").replace(","+zz,"")).split(",");
  
              for(ii=0,len=ss.length;ii&lt;len;ii++){
                  cc=window.sdk[ss[ii]];
                  if(!cc||cc.length&lt;2){
                      continue;
                  }
                  zz=arrFind(val,cc);
                  if(zz&gt;-1){
                      window.sdk[parseInt(ss[ii])].splice(zz,1);
                      if(window.sdk[parseInt(ss[ii])].length==1){
  
                          window.log+=window.sdk[parseInt(ss[ii])][0]+" on "+toRC(ss[ii])+"&lt;br&gt;";
                          xo=delCand(window.sdk[parseInt(ss[ii])][0],ss[ii]);//wn
  
                          jen=xo.length;
                          if(jen&gt;0){
                              for(jj=0;jj&lt;jen;jj++){
                                  dd.push(xo[jj]);
                              }
                          }
                          dd.push(ss[ii]);
                      }
                  }
              }
              return dd;
          }
  
          /*Delete Remaining*/
          function delRem(arr){
              var ii,len,ss;
  
              for(ii=0,len=arr.length;ii&lt;len;ii++){
                  ss=arrFind(arr[ii],window.rem);
                  if(ss&gt;-1){
                      window.rem.splice(ss,1);
                  }
              }
          }
  
          /*Solve Sudoku*/
          function solSudoku(){
              var ii,jj,ll,yy,len,jen,ss,zz,cc,dd,xo;
  
              for(ll=0;ll&lt;1;ll++){
  
                  dd=[];
                  for(ii=0,len=window.rem.length;ii&lt;len;ii++){
  
                      zz=window.sdk[parseInt(window.rem[ii])];
  
                      if(zz.length==0){
                          ss=getCand(window.rem[ii]).split(",");
  
                          if(ss.length==1&amp;&amp;ss[0]!=""){
  
                              window.log+=ss[0]+" on "+toRC(window.rem[ii])+"&lt;br&gt;";
                              xo=writeNumber(ss[0],window.rem[ii]);//wn
  
                              jen=xo.length;
                              if(jen&gt;0){
                                  for(yy=0;yy&lt;jen;yy++){
                                      dd.push(xo[yy]);
                                  }
                              }
                              dd.push(window.rem[ii]);
  
                              ll=-1;
                          }else{
                              if(ss.length&gt;1){
                                  window.sdk[parseInt(window.rem[ii])]=ss;
                              }
                          }
                      }else if(zz.length==1){
                          alert("solSudoku warning");
                          dd.push(window.rem[ii]);
                      }
                  }
                  delRem(dd);
              }
              if(window.rem.length!=0){
                  //failed to solve by simple solving
                  //start advanced solving
              }
          }
  
          //============================================================================
  
          newSudoku("032060007000008290000509000000300016800000002610002000000405000045800000700010530");
  
          solSudoku();
          //000124039007093056390000200040708000008050400000201060005000078270980300980517000
          //032060007000008290000509000000300016800000002610002000000405000045800000700010530
  
  
          //delCand("5","55",true);
  
          //alert("["+sdk.join("][")+"]");
  
          log+="--- Time: "+(new Date().getTime()-perf)+" milliseconds ---";
  
          brd="&lt;table id=\"brd\" cellpadding=\"0\" cellspacing=\"0\"&gt;&lt;tbody&gt;&lt;tr&gt;";
  
          for(i=0;i&lt;sdk.length;i++){
              if(i%9==0){
                  if(i!=0&amp;&amp;i!=80){
                      brd+="&lt;/tr&gt;&lt;tr&gt;";
                  }
              }
              if(sdk[i].length==0){
                  brd+="&lt;td&gt;&amp;nbsp;&lt;/td&gt;";
              }
              if(sdk[i].length==1){
                  brd+="&lt;td&gt;"+sdk[i]+"&lt;/td&gt;";
              }
              if(sdk[i].length&gt;1){
                  brd+="&lt;td&gt;&lt;span&gt;"+sdk[i].join(" ")+"&lt;/span&gt;&lt;/td&gt;";
              }
          }
  
          brd+="&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;";
          log="&lt;div id=\"log\"&gt;"+log+"&lt;/div&gt;";
  
          window.onload=function(){
              document.body.innerHTML+=brd+log;
          }
  </code></pre>