Loading ...
Sorry, an error occurred while loading the content.

Now working window.open after finishing for loop in javascript

Expand Messages
  • rashed mhabub
    Hi, Hope all r fine. In a report i give the check box at the left side of each row. Whether one can select all report by clicking a check box on the top of the
    Message 1 of 2 , Dec 27, 2008
    • 0 Attachment
      Hi,

      Hope all r fine. In a report i give the check box at the left side of each row. Whether one can select all report by clicking a check box on the top of the all check box or click a number of check box by clicking one by one. I write the javascript function but after the for loop the window.open does not work .Could u plz help me.

      The code is :


        function editdn()
        {
         
         
          var client,hid,count,i,check,take,count,counting;
          var myacc=new Array();
          var client1;
          take=1;

          client=window.document.getElementById('getted2').value;   
          hid=window.document.getElementById('checkall');
          count=window.document.getElementById('hid').value;
        

      //-----------------------------------For All client--------

         if(client=='')
            {
             client='active';
            }
           
          if(hid.checked==true)
          { 
           window.open("edit_client_all.php?account="+client,"mywindow","resizable=0,width=430,height=130 ,left=50,top=50,status=yes,scrollbars=yes");
          }
       else
          {
      //-----------------------------------For some client client------------------------

            for(i=1;i<=count;i++)
            {
             check=window.document.getElementById('chk'+i);
             if(check.checked==true)
              {
             
                myacc[i]=check.value;
                take=take+1;
              }
            }
           
          window.open("edit_client_single.php?client1="+myacc+"& counting="+take,"mywindow","resizable=0,width=430,height=130 ,left=50,top=50,status=yes,scrollbars=yes");                                    //[This not working]

           }
           
        }

      WBR
      Rashed



      Check out the all-new Messenger 9.0! Click here.
    • rashed mhabub
      - Hi, Hope all r fine. In a report i give the check box at the left side of each row. Whether one can select all report by clicking a check box on the top of
      Message 2 of 2 , Jan 17, 2009
      • 0 Attachment


        -


        Hi,

        Hope all r fine. In a report i give the check box at the left side of each row. Whether one can select all report by clicking a check box on the top of the all check box or click a number of check box by clicking one by one. I write the javascript function but after the for loop the window.open does not work .Could u plz help me.

        The code is :


          function editdn()
          {
           
           
            var client,hid,count, i,check,take, count,counting;
            var myacc=new Array();
            var client1;
            take=1;

            client=window. document. getElementById( 'getted2' ).value;   
            hid=window.document .getElementById( 'checkall' );
            count=window. document. getElementById( 'hid').value;
          

        //---------- --------- --------- -------For All client------ --

           if(client==' ')
              {
               client='active' ;
              }
             
            if(hid.checked= =true)
            { 
             window.open( "edit_client_ all.php?account= "+client, "mywindow" ,"resizable= 0,width=430, height=130 ,left=50,top= 50,status= yes,scrollbars= yes");
            }
         else
            {
        //---------- --------- --------- -------For some client client------ --------- ---------

              for(i=1;i<=count;i++)
              {
               check=window. document. getElementById( 'chk'+i);
               if(check.checked= =true)
                {
               
                  myacc[i]=check. value;
                  take=take+1;
                }
              }
             
            window.open( "edit_client_ single.php? client1=" +myacc+"& counting="+take, "mywindow" ,"resizable= 0,width=430, height=130 ,left=50,top= 50,status= yes,scrollbars= yes");                                    //[This not working]

             }
             
          }

        WBR
        Rashed



        Check out the all-new Messenger 9.0! Click here.



        Add more friends to your messenger and enjoy! Invite them now.
      Your message has been successfully submitted and would be delivered to recipients shortly.