JavaScript: Pass by Value: Pass by Reference #13

From: http://sitestree.com/?p=5090
Categories:13
Tags:
Post Data:2007-11-21 23:00:16

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

GWT: Google Web Toolkit #13

From: http://sitestree.com/?p=5001
Categories:13
Tags:
Post Data:2009-07-13 16:16:55

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

JavaScript Frameworks #13

The following web-resources discuss some JavaScript Frameworks. Comparisons among the frameworks can also be found.

From: http://sitestree.com/?p=5000
Categories:13
Tags:
Post Data:2007-10-12 20:52:16

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Introduction to JQuery #13

From: http://sitestree.com/?p=4948
Categories:13
Tags:
Post Data:2012-04-20 15:42:24

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Javascript Codes #13

Javascript is a very powerfull scripting language for web-site development. Also, it is in much demand. In Europe Javascript experts earn 29-58 pound/hour [ref: Internet]

  var serviceInstancesArrAtLoad = Array();    var serviceInstancesArrAtSubmit = Array();  var tempArr=Array();            function validate_required(field,alerttxt)  {       with (field)        {           if (value==null||value=='')         {               alert(alerttxt);return false            }           else {return true}      }   }       function validateTicketCreateForm(thisform) {       with (thisform)     {           if (validate_required(type,'Type must be filled out!')==            false)          {type.focus();return false}                     if (validate_required(subject,'Subject must be filled out!')            ==false)            {subject.focus();return false}                              }   }   function validate_customer_create_form(thisform)    {       with (thisform)     {           if (validate_required(firstName,'First name must be filled          out!')==false)          {firstName.focus();return false}                        if (validate_required(lastName,'Last name must be filled            out!')==false)          {lastName.focus();return false}                     if (validate_required(phone,'Phone must be filled out!')==          false)          {phone.focus();return false}                    }   }           function validateUserCreateForm(thisform)   {       with (thisform)     {                                   if (validate_required(firstName,'First name must be filled          out!')==false)          {firstName.focus();return false}                        if (validate_required(lastName,'Last name must be filled            out!')==false)          {lastName.focus();return false}                     if (validate_required(shortName,'Short name must be filled          out!')==false)          {shortName.focus();return false}                        if (validate_required(username,'Username must be filled             out!')==false)          {username.focus();return false}                     /*          if (validate_required(password,'Password must be filled             out!')==false)          {password.focus();return false}                     if (password.value.length 0)            {               if (password.value.length < passwordLength.value)                {alert("Password must be at least "+              passwordLength.value +" char long");                  password.focus();return false}                              if (validate_required(password2,'Please re-enter               password!')==false)                {password2.focus();return false}            }                       if (password.value != password2.value)          {               alert("Password did not match");              password2.focus();              return false            }                   }   }       function validateInventoryCreateForm(thisform)  {       with (thisform)     {           if (validate_required(serial,'serial must be filled out!')            ==false)            {serial.focus();return false}                       if (validate_required(hardwareAddress,'Hardware Address            must be filled out!')==false)          {hardwareAddress.focus();return false}      }   }       function validateInventoryTypeCreateForm(thisform)  {       with (thisform)     {           if (validate_required(name,'Name must be filled out!')==          false)          {name.focus();return false}     }   }       function validateInventoryModelCreateForm(thisform) {       with (thisform)     {           if (validate_required(name,'Name must be filled out!')==          false)          {name.focus();return false}                     if (validate_required(manufacturerId,'Manufacturer must be          filled out!')==false)         {manufacturerId.focus();return false}                       if (validate_required(typeId,'Type must be filled out!')==            false)          {typeId.focus();return false}                               }   }       function validateInventoryManufacturerCreateForm(thisform)  {       with (thisform)     {           if (validate_required(name,'Name must be filled out!')==          false)          {name.focus();return false}     }   }           function validateServiceCreateForm(thisform)    {       with (thisform)     {           if (validate_required(name,'Name must be filled out!')==          false)          {name.focus();return false}                     if (validate_required(typeId,'Type must be filled out!')==            false)          {typeId.focus();return false}                               }   }       function validateHostingCreateForm(thisform)        {           with (thisform)         {               if (validate_required(serviceId,'Service must be               filled out!')==false)              {serviceId.focus();return false}                                if (validate_required(storageSpace,'Storage space              must be filled out!')==false)              {storageSpace.focus();return false}         }       }           function validateDomainName(strValue)   {       return /www.[a-z0-9_-]+.[a-z]{2, 3}/ig.test(strValue);              //var objRegExp  = /^w+([.-]?w+)*(.w{2,3})/;        //check for valid domain        //return objRegExp.test(strValue);  }       function validateDomainServiceCreateForm(thisform)  {       with (thisform)     {           if (validate_required(name,'Domain name must be filled out!')==false)         {name.focus();return false}                     /*if (validateDomainName(name.value)==false)            {alert('Please enter valid domain name');name.focus();            return false;}*/                        if (validate_required(registrar,'Registrar must be filled          out!')==false)         {registrar.focus();return false}                        if (validate_required(registrationTimestamp,'Registration          timestamp must be filled out!')==false)            {registrationTimestamp.focus();return false}                        if (validate_required(expiryTimestamp,'Expiry timestamp            must be filled out!')==false)          {expiryTimestamp.focus();return false}                      if (validate_required(username,'User name must be filled           out!')==false)         {username.focus();return false}                     if (validate_required(password,'Password must be filled            out!')==false)         {password.focus();return false}                     if (password.value.length passwordMaxLength.value)          {alert('Password must be '+ passwordMinLength.value+ '-'+           passwordMaxLength.value +' chars long');            password.focus();return false;}                     if (password.value != password2.value)          {alert('Password must match');password2.focus();            return false;}      }   }                   function validateCommunityCreateForm(thisform)  {       with (thisform)     {           if (validate_required(name,'Name must be filled out!')==            false)          {name.focus();return false}     }   }       function validatePostalCodeCreateForm(thisform) {       with (thisform)     {           if (validate_required(postalCode,'Postal code must be           filled out!')==false)           {postalCode.focus();return false}                       if (validate_required(communityId,'Community must be            filled out!')==false)           {communityId.focus();return false}      }   }       function validateStreetTypeCreateForm(thisform) {       with (thisform)     {           if (validate_required(name,'Name must be filled out!')==            false)          {name.focus();return false}     }   }       function validateStreetCreateForm(thisform) {       with (thisform)     {           if (validate_required(name,'Name must be filled out!')==            false)          {name.focus();return false}                     if (validate_required(typeId,'Type must be filled out!')==          false)          {typeId.focus();return false}                       if (validate_required(communityId,'Community must be filled             out!')==false)          {communityId.focus();return false}      }   }       function validateUnitCreateForm(thisform)   {       with (thisform)     {           if (validate_required(streetId,'Street must be filled out!')            ==false)            {streetId.focus();return false}                     if (validate_required(communityId,'Community must be filled             out!')==false)          {communityId.focus();return false}                      if (validate_required(number,'Number must be filled out!')==            false)          {number.focus();return false}                       if (validate_required(nodeId,'Node must be filled out!')==          false)          {nodeId.focus();return false}                   }   }       function validatePlantCreateForm(thisform)  {       with (thisform)     {           if (validate_required(name,'Name must be filled out!')==            false)          {name.focus();return false}     }   }       function validateCreateTicketCategoryForm(thisform) {       with (thisform)     {           if (validate_required(name,'Name must be filled out!')==            false)          {name.focus();return false}     }   }           function validateStartWorkOnTicketForm(thisform)    {       with (thisform)     {           if (validate_required(startTimestamp,'Start Timestamp must           be filled out!')==false)           {startTimestamp.focus();return false}       }   }       function validateTicketReportForm(thisform) {       with (thisform)     {           if (validate_required(date,'Date must be filled out!')==            false)          {date.focus();return false}     }   }           function validateCloseTicketForm(thisform)  {       with (thisform)     {           if (validate_required(date,'Date must be filled out!')==            false)          {date.focus();return false}                     if (validate_required(time,'Time must be filled out!')==            false)          {time.focus();return false}                 }   }   function validateCreateWorkOrder(thisform)  {       with (thisform)     {           if (validate_required(inventoryId,'Inventory must be filled             out!')==false)          {inventoryId.focus();return false}                      if (validate_required(assignedTo,'Assigned to must be           provided!')==false)         {assignedTo.focus();return false}                       if (validate_required(scheduledDate,'Scheduled date must            be provided!')==false)          {scheduledDate.focus();return false}                        if (validate_required(scheduledTime,'Scheduled time must            be provided!')==false)          {scheduledTime.focus();return false}                    }   }                   function addService(services,serviceId) {       for (var i = 0; i < services.length; i++)        {           if (services.options[i].selected)           {               serviceIdLength = serviceId.length++;               serviceId.options[serviceIdLength].text =                   services.options[i].text;               serviceId.options[serviceIdLength].value =                  services.options[i].value;                          }       }   }           function removeService(serviceId)   {       for (var i = 0; i < serviceId.length; i++)       {           if (serviceId.options[i].selected)          {                               serviceId.options[i].text = '';               serviceId.options[i].value = '';              serviceId.options[i].selected = false;              serviceId.options[i].remove();          }                   }           }       function validateAssignInventoryForm()  {               var serviceArr=document.getElementsByName("serviceArr[]");        length=serviceArr.length;       isAnySelected = false;              for (var i=0;i<length;i++)       {           if (serviceArr[i].checked == true)          {               isAnySelected=true;             i=length;           }       }                               var serviceRequested=new Array();       var inventoriesHavingSameService=new Array();       var servicesHavingSameInventory=new Array();        var isServiceRequested = 0;     for (var i=0;i 0)              isServiceRequested = 1;                      if (serviceArr[i].checked == true)          {              if (inventoriesHavingSameService[service] >= 0)               inventoriesHavingSameService[service]=inventoriesHavingSameService[service]+1;             else                 inventoriesHavingSameService[service]=1;                           if (servicesHavingSameInventory[inventory] > 0)               servicesHavingSameInventory[inventory]=servicesHavingSameInventory[inventory]+1;               else             servicesHavingSameInventory[inventory]=1;           }                               }           if (   (!isAnySelected) && (isServiceRequested) )       {           alert('Service & inventory requested. But no checkbox is selected');            return false;       }       else if (!isAnySelected)        {           var response = confirm('No checkbox is selected, do you want to proceed');          if (!response) return false;        }               var errMsg ='';             for (k=1;k= 0 )         {                   if ( (serviceRequested[k] != inventoriesHavingSameService[k])  )                {                   if (serviceRequested[k]>0)                       errMsg = errMsg + "Inventory is not                         checked properly for service " + k                      +", Requested:" + serviceRequested[k] +",                       Assigned:" + inventoriesHavingSameService[k] + "n";                 else if (serviceRequested[k]==0 && inventoriesHavingSameService[k]>0)                        errMsg = errMsg + "Inventory is not                         checked properly for service " + k                      +", Requested:" + serviceRequested[k] +",                       Assigned:" + inventoriesHavingSameService[k] + "n";             }           }       }                   if (errMsg.length>0)     {           alert(errMsg);          return false;       }       return true;    }       //not 100% right, will fix later    function checkDateFormat()  {       var pattern = new RegExp(0|1[0-9]/[0-3][0-9]/[0-9][0-9]);       if(document.getElementById('timestampStarted').value.match(pattern))        {           var date_array = document.getElementById('timestampStarted').value.split('/');                      var month = date_array[0];          var day = date_array[1];            var year = date_array[2];           // This instruction will create a date object           source_date = new Date(year,month,day);             if(month != source_date.getMonth())         {               alert('Month is not valid!');               return false;           }               if(day != source_date.getDate())            {               alert('Day is not valid!');             return false;           }                       if(year != source_date.getYear())           {               alert('Year is not valid!');                return false;           }       }       else        {           alert('Date format is not valid!');         return false;       }           return true;    }   //used by assignService.php function initializeServiceInstanceArr() {       if (serviceInstancesArrAtLoad.length == 0)          serviceInstancesArrAtLoad=document.getElementsByName("serviceInstances[]");     length=serviceInstancesArrAtLoad.length;        for(i=0;i<length ;i++)       {           tempArr[i]=serviceInstancesArrAtLoad[i].value;      }   }       //used by assignService.php //tempArr is filled up at the page load and by  function validateAssignServiceForm(thisform,serviceId)  {       var flag=false;     with (thisform)     {           if (validate_required(timestampStarted,'Start Date must            be filled out!')==false)           {timestampStarted.focus();return false}     }                       if (checkDateFormat()==false)       {return false}              serviceInstancesArrAtSubmit=document.getElementsByName("serviceInstances[]");     length=serviceInstancesArrAtSubmit.length;              for (var i=0;i<length;i++)       {           if (serviceInstancesArrAtSubmit[i].value != tempArr[i])         {               flag = true;                break;          }       }                   if (flag)       {           //service id is checked otherwise the data will not be passed           //to PHP scripts            for (var i = 1; i < serviceId.length; i++)           {               serviceId.options[i].selected = true;           }           return true;        }       else        {           alert('Nothing has been changed');            return false;       }   }       function checkAllInventories2(serviceId)    {               serviceCheckAll=document.getElementsByName("serviceCheckAll[]");              inventoryCheckAll=document.getElementsByName("inventoryCheckAll[]");      serviceArr=document.getElementsByName("serviceArr[]");                length = serviceCheckAll.length;        lengthInventoryCheckAll=inventoryCheckAll.length;       lengthServiceArr=serviceArr.length;             var status=false;       for (i=0;i<length;i++)           if (serviceCheckAll[i].value==serviceId)                status = serviceCheckAll[i].checked;                    lengthArr = serviceArr.length;      for (j=0;j<lengthArr;j++)        {           var value=serviceArr[j].value;          var valueElements = value.split(':');                 if (valueElements[1]==serviceId)            {               serviceArr[j].checked=status; //serviceCheckAll.checked;//!serviceArr[j].checked;                               if (status==false)              {                   var inventoryId=valueElements[0];                   //alert(inventoryId);                                       //alert(lengthInventoryCheckAll);                   for (i=0;i<lengthInventoryCheckAll;i++)                      if (inventoryCheckAll[i].value==inventoryId)                            inventoryCheckAll[i].checked = false;               }               else if (status==true)              {                   var flag=true;                  var inventoryId=valueElements[0];                                       //alert(inventoryId);                                       for (k=0;k<lengthServiceArr;k++)                 {                       var value2nd=serviceArr[k].value;                       var valueElements2nd = value2nd.split(':');                       if (valueElements2nd[0]==inventoryId)                        if (serviceArr[k].checked==false)                          flag=false;                 }                                       if (flag==true)                 {                           for (i=0;i<lengthInventoryCheckAll;i++)                              if (inventoryCheckAll[i].value==inventoryId)                                    inventoryCheckAll[i].checked = true;                    }                               }                                           }       }   }           function checkAllServices2(inventoryId) {       inventoryCheckAll=document.getElementsByName("inventoryCheckAll[]");      serviceCheckAll=document.getElementsByName("serviceCheckAll[]");              serviceArr=document.getElementsByName("serviceArr[]");                        length = inventoryCheckAll.length;      lengthArr = serviceArr.length;      lengthServiceCheckAll=serviceCheckAll.length;               status=false;       for (i=0;i<length;i++)           if (inventoryCheckAll[i].value==inventoryId)                status = inventoryCheckAll[i].checked;              for (j=0;j<lengthArr;j++)        {           var value=serviceArr[j].value;          var valueElements = value.split(':');                 if (valueElements[0]==inventoryId)          {               serviceArr[j].checked=status;//serviceCheckAll.checked;//!serviceArr[j].checked;                if (status==false)              {                   var serviceid=valueElements[1];                                     for (i=0;i<lengthServiceCheckAll;i++)                        if (serviceCheckAll[i].value==serviceid)                            serviceCheckAll[i].checked = false;             }               else if (status==true)              {                   var flag=true;                  var serviceId=valueElements[1];                 //alert(inventoryId);                   for (k=0;k<lengthArr;k++)                    {                       var value2nd=serviceArr[k].value;                       var valueElements2nd = value2nd.split(':');                       if (valueElements2nd[1]==serviceId)                      if (serviceArr[k].checked==false)                          flag=false;                 }                   if (flag==true)                 {                       for (i=0;i0 )           {               var forwardAddresses = forwardAddress.value.split(',');             var length=forwardAddresses.length;             for(var i=0;i=1)                {                   lengthModelId=modelId.options.length;                   modelId.options[lengthModelId-1]=null;              }                   for(var i=0;i=1)                {                   lengthAddressId=addressId.options.length;                   addressId.options[lengthAddressId-1]=null;              }                   for(var i=0;i=1)                {                   lengthServiceId=serviceId.options.length;                   serviceId.options[lengthServiceId-1]=null;              }                   for(var i=0;i<length -1;i++)             {                   values=serviceIdArr[i].split(':');                    var newOption = document.createElement("option");                 newOption.value = values[0];                    newOption.innerHTML = values[1];                    serviceId.appendChild(newOption);               }           }      }            page_request.open('GET', '/Service/changeServicesList.php?serviceTypeId='+serviceTypeId.value, true)        page_request.send(null) }       function validateServiceSpeedAssignForm(thisForm)   {       with(thisForm)      {           if (validate_required(serviceId,'Service Type & Service must be filled out!')==false)         {serviceId.focus();return false}                        if (validate_required(cmtsSpeedId,'Cmts Speed must be filled out!')==false)           {cmtsSpeedId.focus();return false}                  }   }               //docsis        function validateDocsisServiceGroupCreateForm(thisform)     {       with (thisform)     {           if (validate_required(cmtsVlan,'DHCP Vlan must be filled out!')==false)           {cmtsVlan.focus();return false}                                             if (validate_required(cmtsInterfaceName,'Interface name must be filled out!')==false)         {cmtsInterfaceName.focus();return false}                        if (validate_required(cmtsInterfaceBundleId,'Interface bundle must be filled out!')==false)           {cmtsInterfaceBundleId.focus();return false}        }   }       function validateDocsisInterfaceBundleCreateForm(thisForm)  {       with(thisForm)      {           if (validate_required(name,'Interface bundle name must be filled out!')==false)           {name.focus();return false}                     if (validate_required(docsisCmtsId,'Docsis cmts must be filled out!')==false)         {docsisCmtsId.focus();return false}                     if (validate_required(cmtsVlanAddress,'Cmts Vlan address must be filled out!')==false)            {cmtsVlanAddress.focus();return false}                  }       }       function validateDocsisInventoryCreateForm(thisform)    {       with (thisform)     {           if (validate_required(inventoryModelId,'Inventory Model            must be filled out!')==false)          {inventoryModelId.focus();return false}                     if (validate_required(docsisVersion,'Docsis Version            must be filled out!')==false)          {docsisVersion.focus();return false}        }   }       function validateDocsisServiceCreateForm(thisform)  {       with (thisform)     {           if (validate_required(serviceId,'Service must be filled out!')==false)            {serviceId.focus();return false}                        if (validate_required(downloadSpeed,'Download speed must be            filled out!')==false)          {downloadSpeed.focus();return false}                        /*if (validate_required(uploadSpeed,'Upload speed must be          filled out!')==false)          {uploadSpeed.focus();return false}*/                    }   }       function validateDocsisSettingCreateForm(thisform)  {       with (thisform)     {           if (validate_required(customerId,'Customer must be filled          out!')==false)         {customerId.focus();return false}                       if (validate_required(serviceId,'Service must be filled out!')==false)            {serviceId.focus();return false}                                if (validate_required(overrideConfigFile,'Override config          file must be filled out!')==false)         {overrideConfigFile.focus();return false}       }   }       //hosting   function validateCustomerHostingParameters(thisform)    {       with (thisform)     {           if (validate_required(domainId,'Domain name must be filled             out!')==false)         {domainId.focus();return false}                     if (validate_required(serviceId,'Service name must be          filled out!')==false)          {serviceId.focus();return false}        }   }       function validateHostingSiteUserCreateForm(thisform)    {       with (thisform)     {           if (validate_required(username,'Site user name must be             filled out!')==false)          {username.focus();return false}                     if (validate_required(password,'Site password must be          filled out!')==false)          {password.focus();return false}                     if ( password.value.length   passwordMaxLength.value)           {alert('Password length should be < = '+passwordMaxLength.value );          password.focus();return false}                                              if (validate_required(password2,'Please re-enter site password !')==false)            {password2.focus();return false}                        if (password.value != password2.value)          {               alert("Site User Passwords must match");              password2.focus();              return false            }       }   }       function validateHostingDomainUserCreateForm(thisform)  {       with (thisform)     {           if (validate_required(domainId,'Domain name must be            filled out!')==false)          {domainId.focus();return false}                                 if (validate_required(username,'Domain user name must          be filled out!')==false)           {username.focus();return false}                     if (validate_required(password,'Domain password must be            filled out!')==false)          {password.focus();return false}                                 if ( password.value.length   passwordMaxLength.value)           {alert('Password length should be < = '+passwordMaxLength.value );                         password.focus();return false}                                   if (validate_required(password2,'Please re-enter site password !')==false)            {password2.focus();return false}                        if (password.value != password2.value)          {               alert("Domain User Passwords must match");                password2.focus();              return false            }       }   }           //outage    function validateOutageCreateForm(thisform) {       with (thisform)     {           if (validate_required(subject,'Subject must be filled out!')==false)          {subject.focus();return false}                      //check community selection         var communityNamesArr=document.getElementsByName("communityNames[]");         lengthArr= communityNamesArr.length;                        var isAnySelected = false;                      for (var i=0;i<lengthArr;i++)            {               if (communityNamesArr[i].checked == true)               {                   isAnySelected=true;                 i=lengthArr;                }           }                       if (!isAnySelected)             {               alert('You must select a community');             return false;           }                                   //check recipient selection         var outageRecipientNamesArr=document.getElementsByName("outageRecipientNames[]");         lengthArr= outageRecipientNamesArr.length;                      var isAnySelected = false;                      for (var i=0;i<lengthArr;i++)            {               if (outageRecipientNamesArr[i].checked == true)             {                   isAnySelected=true;                 i=lengthArr;                }           }                       if (!isAnySelected)             {               alert('You must select a recipient');             return false;           }           return true;        }   }

From: http://sitestree.com/?p=4784
Categories:13
Tags:
Post Data:2010-04-27 09:16:44

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

JavaScript – Miscellaneous Validations #13

    function validateDomainName(strValue)   {       return /www.[a-z0-9_-]+.[a-z]{2, 3}/ig.test(strValue);          }   function validateDomainName(strValue)   {       return /www.[a-z0-9_-]+.[a-z]{2, 3}/ig.test(strValue);          }   //not 100% right, will fix later    function checkDateFormat()  {       var pattern = new RegExp(0|1[0-9]/[0-3][0-9]/[0-9][0-9]);       if(document.getElementById('timestampStarted').value.match(pattern))        {           var date_array = document.getElementById('timestampStarted').value.split('/');                      var month = date_array[0];          var day = date_array[1];            var year = date_array[2];           // This instruction will create a date object           source_date = new Date(year,month,day);             if(month != source_date.getMonth())         {               alert('Month is not valid!');               return false;           }               if(day != source_date.getDate())            {               alert('Day is not valid!');             return false;           }                       if(year != source_date.getYear())           {               alert('Year is not valid!');                return false;           }       }       else        {           alert('Date format is not valid!');         return false;       }           return true;    }   function validateEmail( strValue)   {       var objRegExp  = /(^[a-z]([a-z_.]*)@([a-z_.]*)([.][a-z]{3})$)|(^                [a-z]([a-z_.]*)@([a-z_.]*)(.[a-z]{3})(.[a-z]{2})*$)/i;          //check for valid email         return objRegExp.test(strValue);    }   //AJAX Example  function ajaxFunctionGeneral()  {       var page_request = false        if (window.XMLHttpRequest) // if Mozilla, IE7, Safari etc           page_request = new XMLHttpRequest()     else if (window.ActiveXObject)      { // if IE          try             {               page_request = new ActiveXObject("Msxml2.XMLHTTP")          }           catch (e)           {               try             {                   page_request = new ActiveXObject("Microsoft.XMLHTTP")               }               catch (e)               {               }           }       }       else                    return false        return page_request;    }   function reboot(deviceId)   {       var response=confirm('Are you sure to reboot');             if(!response)           exit;               page_request = ajaxFunctionGeneral();       if (!page_request) return false;                page_request.onreadystatechange=function()      {       if(page_request.readyState==4)          {               var response=page_request.responseText;             var displayArea = document.getElementById('showDiagnosticsResults');                displayArea.value = response;           }      }        page_request.open('GET', '/Inventory/Diagnostics/reboot.php?deviceId='+deviceId, true)      page_request.send(null) }

From: http://sitestree.com/?p=4779
Categories:13
Tags:
Post Data:2008-12-29 21:43:54

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Javascript – Form validation #13

The code will be helpful in validating data entry forms such as: user registration, user creation. validate_required is used by all other functions

function validate_required(field,alerttxt)   {       with (field)        {           if (value==null||value=='')         {               alert(alerttxt);return false            }           else {return true}      }   }       function validateTicketCreateForm(thisform) {       with (thisform)     {           if (validate_required(type,'Type must be filled out!')==false)          {type.focus();return false}                     if (validate_required(subject,'Subject must be filled out!')==false)            {subject.focus();return false}                              }   }   function validate_customer_create_form(thisform)    {       with (thisform)     {           if (validate_required(firstName,'First name must be filled out!')==false)           {firstName.focus();return false}                        if (validate_required(lastName,'Last name must be filled out!')==false)         {lastName.focus();return false}                     if (validate_required(phone,'Phone must be filled out!')==false)            {phone.focus();return false}                    }   }           function validateUserCreateForm(thisform)   {       with (thisform)     {                                   if (validate_required(firstName,'First name must be filled out!')==false)           {firstName.focus();return false}                        if (validate_required(lastName,'Last name must be filled out!')==false)         {lastName.focus();return false}                     if (validate_required(shortName,'Short name must be filled out!')==false)           {shortName.focus();return false}                        if (validate_required(username,'Username must be filled out!')==false)          {username.focus();return false}                                 if (validate_required(password,'Password must be filled out!')==false)          {password.focus();return false}                     if (password.value.length < passwordLength.value) {alert("Password must be              at least " + passwordLength.value +" char long");    password.focus();return false}                      if (validate_required(password2,'Please re-enter password!')==false)          {password2.focus();return false}                        if (password.value != password2.value)          {               alert("Password did not match");              password2.focus();              return false                        }                               }   }

From: http://sitestree.com/?p=4778
Categories:13
Tags:
Post Data:2012-10-22 22:13:07

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

#Sensor: #Canada: #Job/Contract/Project: #Sensor, #Tracking, #Fusion, #Estimation, #Surveillance, #sensor network, #target #tracking, #security 2021-08-27

Date Posted:2021-08-27 .Apply yourself, or submit others as candidates; Build a recruitment team to submit others as candidates; submit RFP to be considered for projects in future; Try to become a vendor so that you are asked to submit consultants/resources in future. If these work for you. This list is posted in this blog everyday provided there are new projects under the criteria

  1. communications-detection-and-fibre-optics-10031
  2. License Plate Recognition (LPR) Equipment for Parking Data Collection
  3. edp-hardware-and-software-10034
  4. Automated License Plate Recognition System
  5. fire-fighting-security-and-safety-equipment-10010
  6. ITQ2021-08-27 for Purchase of Security Safes and Parts
  7. scientific-instruments-10024
  8. Nanoparticle Tracking Analysis Instrument
  9. custodial-operations-and-related-services-10037
  10. UNBSJ Security Services – NB
  11. PRE-QUALIFICATION REQUEST ("PQR") for SECURITY GUARD SERVICES
  12. operation-of-government-owned-facilities-10039
  13. Security Guard Services for Off-Street Operations
  14. professional-administrative-and-management-support-services-10040
  15. Preclearance Security System Core Infrastructure Refresh
  16. research-and-development-r-d-10036
  17. License Plate Recognition (LPR) Equipment for Parking Data Collection
  18. Keywords Used:sensor,fusion,sensor network,tracking,target tracking,surveillance,self driving car,self-driving,estimation,security,signal processing,image processing,autonomouse vehicle,facial recognition,signal,recognition,sensor fusion

    Javascript by Example #13

    JavaScript by Example:

    JavaScript by Example:

    Example 1.1 A simple JavaScript program Run View Source
    Example 1.2 An HTML form with a JavaScript event handlerdefined Run View Source
    Example 1.3 Estimating Your Taxes with JavaScript Run View Source
    Example 6.1 Defining JavaScript Functions ViewSource
    Example 6.2 Using Functions as Data ViewSource
    Example 6.3 Checking for the Correct Number of Arguments View Source
    Example 6.4 A Multi-Argument max() Function ViewSource
    Example 6.5 Creating and Initializing an Array ViewSource
    Example 6.6 Using Static Variables ViewSource
    Example 7.1 A Rectangle Object Constructor Function ViewSource
    Example 7.2 Defining and Invoking a Method ViewSource
    Example 7.3 Defining Methods in a Constructor ViewSource
    Example 7.4 Defining a Class with a Prototype Object View Source
    Example 7.5 Defining instance/class variables and methods View Source
    Example 7.6 Defining and using the valueOf() method ViewSource
    Example 8.1 An Array Constructor ViewSource
    Example 9.1 Copying, Passing, and Comparing by Value View Source
    Example 9.2 Copying, Passing, and Comparing by Reference View Source
    Example 9.3 References Themselves are Passed by Value ViewSource
    Example 9.4 Are Strings and Functions Compared by Value orReference? Run View Source
    Example 9.5 The assign() Method ViewSource
    Example 10.1 A Simple JavaScript Program in an HTML FileRun View Source
    Example 12.1 Using the alert(), confirm() and prompt() methodsRun View Source
    Example 12.2 Displaying and Reporting JavaScript Errors witha Run View Source
    Example 12.3 Displaying a link’s destination in the statusline Run View Source
    Example 12.4 A digital clock in the status line Run View Source
    Example 12.5 Creating an invisible frame ViewSource
    Example 12.6 Dynamically creating and animating framesRun View Source
    Example 13.1 Getting Browser Version Information ViewSource
    Example 13.2 Extracting Arguments from a URL ViewSource
    Example 13.3 A Navigation Bar Using the History and LocationObjects View Source
    Example 14.1 Creating a plain-text document Run View Source
    Example 14.2 Generating XBM images with JavaScript Run View Source
    Example 14.3 Listing the Links in a Document ViewSource
    Example 14.4 A Random Hypertext Link ViewSource
    Example 14.5 Invoking Methods of a Java applet from JavaScript View Source
    Example 15.1 A Utility Class for Working with CookiesRun View Source
    Example 16.1 An Animation Using Image Replacement Run View Source
    Example 16.2 An Animation Using the onLoad() Event HandlerRun View Source
    Example 16.3 Implementing a Toggle Button with Image ReplacementRun View Source
    Example 17.1 An HTML Form Containing all Form ElementsRun View Source
    Example 17.2 Performing Form Validation Run View Source
    Example 18.1 A Script Hidden from Old Browsers ViewSource
    Example 18.2 Displaying a Message on non-JavaScript Browsers View Source
    Example 18.3 Loading a JavaScript-based page only if JavaScriptis supported View Source
    Example 18.4 Displaying a Message with View Source
    Example 18.5 Displaying a Message for Browsers that do notSupport JavaScript 1.1 View Source
    Example 18.6 A Web Page to test for JavaScript Compatibility View Source
    Example 18.7 Displaying a Failure Message when using View Source
    Example 19.1 Scripting the built-in Java classes Run View Source
    Example 19.2 Controlling an Applet with JavaScript ViewSource
    Example 19.3 Controlling a Plug-in from JavaScript Run View Source
    Example 19.4 Using JavaScript from an Applet Method ViewSource
    Example 19.5 A Java OutputStream for Displaying HTML in aBrowser Window View Source

    Reference:

    http://examples.oreilly.com/jscript2/ From: http://sitestree.com/?p=4740
    Categories:13
    Tags:
    Post Data:2013-05-05 02:36:52

        Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
        (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
        In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
        <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
        8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
        Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
        Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>
    

    Handling Checkbox arrays with Javascript::GetElementsByName:XHTML supported #13

    The following code demonstrates how to handle checkboxes with javascript. Note the names of all check boxes are same myInput[]. It could also be myInput. Both works as an array to contain the controls’ values. I prefer myInput[] as you can handle this control in PHP as an array. If you use $arr=$_POST[‘myInput’], $arr will contain the values of the controls.

    Note the use of getElementsByName(). It is easy to manipulate javascript controls using this name. You do not need to send a value/control to the function. And in many times, document.myform.control, does not work right, specially if you want to main XHTML standard[i need to check more on this]. getElementById is also very useful. You may use getElementById for most times, but with checkbox arrays getElementsByName is better choice.

    Also, note that when a form is submitted only the values of the checked check boxes are submitted to the server. You may wish to use hidden controls to keep the values, so that all values are submitted and based on the checked/non-checked you can ..control your work

                            function getElements()            {           var x=document.getElementsByName("myInput[]");              alert(x.length);            alert(x[0].value);              alert(x[1].value);              alert(x[2].value);              }         10 
    20
    30

    Want to check how the code works, check below

    function getElements() { var x=document.getElementsByName(“myInput[]”); alert(x.length); alert(x[0].value); alert(x[1].value); alert(x[2].value); }10
    20
    30

    From: http://sitestree.com/?p=4735
    Categories:13
    Tags:
    Post Data:2009-12-11 16:22:24

        Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
        (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
        In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
        <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
        8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
        Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
        Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>