emulator -avd -http-proxy http://LOCAL:8888

 You need to add http-proxy option to track the request in Charles Proxy

 


   I hope it happens when there is delay in the HTTP response.  We can suppress it using the error_reporting functionalists.

 


  var group = document.getElementsByName('groups[]');
 var groupError    =    true;
   
    for(var g = 0; g < group.length; g++)
    {
        if(group[g].checked == true)
            groupError    =    false;
    }
document.write(groupError);

 

How to count the html array elements

By Webdevelopmentlogics


To count the html elements, it's better to set and use the className attribute.
     Ex:
      input type="text" class="clsUser" name="user[1][]"
      input type="text" class="clsUser" name="user[1][]"

      Then in the javascript/jQuery, we can use
     $('.class="clsUser').length and it returns the length 2

 

How to use SELECT Query in MYSQL TRIGGER

Posted In: . By Webdevelopmentlogics


DROP TRIGGER IF EXISTS `updateInstancesResults`;
DELIMITER //
CREATE TRIGGER `updateInstancesResults` AFTER INSERT ON `form_results`
 FOR EACH ROW BEGIN
    DECLARE showPendingInstance INT(10);
    UPDATE instances SET response_status = 'taken' WHERE instance_id = NEW.instance_id;
    SET showPendingInstance     = (SELECT `value` FROM `attribute_xref` WHERE form_id = NEW.form_id AND `attribute_id` =2 LIMIT 1);
    IF (showPendingInstance = 0) THEN
           UPDATE instances SET response_status = 'skipped', status = 0 WHERE form_id = NEW.form_id
        AND response_status = 'pending'
        AND instance_id < NEW.instance_id;
    END IF;
  END
//
DELIMITER ;

 


var click = "showQuestionForm('"+(tableIdCount)+"','edit')";
                var newXClick = eval("(function(){"+click+"});");
                $("#qHrefLink").get(0).onclick = newXClick;

 

How to add elements to javascript Array

Posted In: . By Webdevelopmentlogics


We can use the push() function to add elements to array

       Ex:
       var jsArray    =    new Array();
    jsArray.push('1');
    jsArray.push('2');

 


We can check it by typing the port number 8080(default port for tomcat) in the url.
  If we need to check in local machine try http://localhost:8080/ and for remote server http://domanname:8080/