{"id":65806,"date":"2021-07-15T04:10:05","date_gmt":"2021-07-15T08:10:05","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/javascript-codes-javascript\/"},"modified":"2021-07-15T04:10:05","modified_gmt":"2021-07-15T08:10:05","slug":"javascript-codes-javascript","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=65806","title":{"rendered":"JavaScript Codes #JavaScript"},"content":{"rendered":"<p>JavaScript is a very powerful scripting language for web-site development. Also, it is in much demand.<\/p>\n<pre>\tvar serviceInstancesArrAtLoad = Array();\r\n\tvar serviceInstancesArrAtSubmit = Array();\r\n\tvar tempArr=Array();\t\r\n\t\r\n\tfunction validate_required(field,alerttxt)\r\n\t{\r\n\t\twith (field)\r\n\t\t{\r\n\t\t\tif (value==null||value=='')\r\n\t\t\t{\r\n\t\t\t\talert(alerttxt);return false\r\n\t\t\t}\r\n\t\t\telse {return true}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateTicketCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(type,'Type must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{type.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(subject,'Subject must be filled out!')\r\n\t\t\t==false)\r\n\t\t\t{subject.focus();return false}\r\n\t\t\t\t\t\t\r\n\t\t}\r\n\t}\r\n\r\n\tfunction validate_customer_create_form(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(firstName,'First name must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{firstName.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(lastName,'Last name must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{lastName.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(phone,'Phone must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{phone.focus();return false}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tfunction validateUserCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\tif (validate_required(firstName,'First name must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{firstName.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(lastName,'Last name must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{lastName.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(shortName,'Short name must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{shortName.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(username,'Username must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{username.focus();return false}\r\n\t\t\t\r\n\t\t\t\/*\r\n\t\t\tif (validate_required(password,'Password must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{password.focus();return false}\r\n\t\t\t\r\n\t\t\tif (password.value.length &lt; passwordLength.value) \r\n\t\t\t{alert(\"Password must be at least \"+ \r\n\t\t\tpasswordLength.value +\" char long\");\tpassword.focus();\r\n\t\t\treturn false}\r\n\t\t\t\r\n\t\t\tif (validate_required(password2,'Please re-enter password!')\r\n\t\t\t==false)\r\n\t\t\t{password2.focus();return false}\r\n\t\t\t\r\n\t\t\tif (password.value != password2.value)\r\n\t\t\t{\r\n\t\t\t\talert(\"Password did not match\");\r\n\t\t\t\tpassword2.focus();\r\n\t\t\t\treturn false\t\t\t\r\n\t\t\t}\r\n\t\t\t*\/\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\r\n\tfunction validate_assign_group_form(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(groupId,'Group name must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{groupId.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(userId,'Action on invalid user!')==\r\n\t\t\tfalse)\r\n\t\t\t{userId.focus();return false}\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateGroupCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(name,'Group name must be filled out!')\r\n\t\t\t==false)\r\n\t\t\t{name.focus();return false}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateAssignGroupPermissionForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(taskId,'Task module name must be \r\n\t\t\tfilled out!')==false)\r\n\t\t\t{taskId.focus();return false}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateAssignTaskPermissionForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(groupId,'Group name must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{groupId.focus();return false}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateUserEditForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\tif (validate_required(firstName,'First name must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{firstName.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(lastName,'Last name must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{lastName.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(shortName,'Short name must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{shortName.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(username,'Login id must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{username.focus();return false}\r\n\t\t\t\t\t\t\r\n\t\t\tif (password.value.length&gt;0)\r\n\t\t\t{\r\n\t\t\t\tif (password.value.length &lt; passwordLength.value) \r\n\t\t\t\t{alert(\"Password must be at least \"+ \r\n\t\t\t\tpasswordLength.value +\" char long\");\t\r\n\t\t\t\tpassword.focus();return false}\r\n\t\t\t\t\r\n\t\t\t\tif (validate_required(password2,'Please re-enter \r\n\t\t\t\tpassword!')==false)\r\n\t\t\t\t{password2.focus();return false}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (password.value != password2.value)\r\n\t\t\t{\r\n\t\t\t\talert(\"Password did not match\");\r\n\t\t\t\tpassword2.focus();\r\n\t\t\t\treturn false\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateInventoryCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(serial,'serial must be filled out!')\r\n\t\t\t==false)\r\n\t\t\t{serial.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(hardwareAddress,'Hardware Address \r\n\t\t\tmust be filled out!')==false)\r\n\t\t\t{hardwareAddress.focus();return false}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateInventoryTypeCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(name,'Name must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{name.focus();return false}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateInventoryModelCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(name,'Name must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{name.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(manufacturerId,'Manufacturer must be\r\n\t\t\t filled out!')==false)\r\n\t\t\t{manufacturerId.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(typeId,'Type must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{typeId.focus();return false}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateInventoryManufacturerCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(name,'Name must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{name.focus();return false}\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tfunction validateServiceCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(name,'Name must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{name.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(typeId,'Type must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{typeId.focus();return false}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateHostingCreateForm(thisform)\r\n\t\t{\r\n\t\t\twith (thisform)\r\n\t\t\t{\r\n\t\t\t\tif (validate_required(serviceId,'Service must be \r\n\t\t\t\tfilled out!')==false)\r\n\t\t\t\t{serviceId.focus();return false}\r\n\t\t\t\t\r\n\t\t\t\tif (validate_required(storageSpace,'Storage space \r\n\t\t\t\tmust be filled out!')==false)\r\n\t\t\t\t{storageSpace.focus();return false}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\tfunction validateDomainName(strValue) \r\n\t{\r\n\t\treturn \/www.[a-z0-9_-]+.[a-z]{2, 3}\/ig.test(strValue);\r\n\t\t\r\n\t\t\/\/var objRegExp  = \/^w+([.-]?w+)*(.w{2,3})\/;\r\n\r\n  \t\t\/\/check for valid domain\r\n  \t\t\/\/return objRegExp.test(strValue);\r\n\t}\r\n\t\r\n\tfunction validateDomainServiceCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(name,'Domain name must be filled out!')==false)\r\n\t\t\t{name.focus();return false}\r\n\t\t\t\r\n\t\t\t\/*if (validateDomainName(name.value)==false)\r\n\t\t\t{alert('Please enter valid domain name');name.focus();\r\n\t\t\treturn false;}*\/\r\n\t\t\t\r\n\t\t\tif (validate_required(registrar,'Registrar must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{registrar.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(registrationTimestamp,'Registration \r\n\t\t\ttimestamp must be filled out!')==false)\r\n\t\t\t{registrationTimestamp.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(expiryTimestamp,'Expiry timestamp \r\n\t\t\tmust be filled out!')==false)\r\n\t\t\t{expiryTimestamp.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(username,'User name must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{username.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(password,'Password must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{password.focus();return false}\r\n\t\t\t\r\n\t\t\tif (password.value.length &lt; passwordMinLength.value || \r\n\t\t\tpassword.value.length&gt;passwordMaxLength.value)\r\n\t\t\t{alert('Password must be '+ passwordMinLength.value+ '-'+ \r\n\t\t\tpasswordMaxLength.value +' chars long');\r\n\t\t\tpassword.focus();return false;}\r\n\t\t\t\r\n\t\t\tif (password.value != password2.value)\r\n\t\t\t{alert('Password must match');password2.focus();\r\n\t\t\treturn false;}\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t\r\n\tfunction validateCommunityCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(name,'Name must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{name.focus();return false}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validatePostalCodeCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(postalCode,'Postal code must be \r\n\t\t\tfilled out!')==false)\r\n\t\t\t{postalCode.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(communityId,'Community must be \r\n\t\t\tfilled out!')==false)\r\n\t\t\t{communityId.focus();return false}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateStreetTypeCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(name,'Name must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{name.focus();return false}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateStreetCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(name,'Name must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{name.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(typeId,'Type must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{typeId.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(communityId,'Community must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{communityId.focus();return false}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateUnitCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(streetId,'Street must be filled out!')\r\n\t\t\t==false)\r\n\t\t\t{streetId.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(communityId,'Community must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{communityId.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(number,'Number must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{number.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(nodeId,'Node must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{nodeId.focus();return false}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validatePlantCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(name,'Name must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{name.focus();return false}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateCreateTicketCategoryForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(name,'Name must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{name.focus();return false}\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tfunction validateStartWorkOnTicketForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(startTimestamp,'Start Timestamp must\r\n\t\t\t be filled out!')==false)\r\n\t\t\t{startTimestamp.focus();return false}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateTicketReportForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(date,'Date must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{date.focus();return false}\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tfunction validateCloseTicketForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(date,'Date must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{date.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(time,'Time must be filled out!')==\r\n\t\t\tfalse)\r\n\t\t\t{time.focus();return false}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\r\n\tfunction validateCreateWorkOrder(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(inventoryId,'Inventory must be filled \r\n\t\t\tout!')==false)\r\n\t\t\t{inventoryId.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(assignedTo,'Assigned to must be \r\n\t\t\tprovided!')==false)\r\n\t\t\t{assignedTo.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(scheduledDate,'Scheduled date must \r\n\t\t\tbe provided!')==false)\r\n\t\t\t{scheduledDate.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(scheduledTime,'Scheduled time must \r\n\t\t\tbe provided!')==false)\r\n\t\t\t{scheduledTime.focus();return false}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t\r\n\tfunction addService(services,serviceId)\r\n\t{\r\n\t\tfor (var i = 0; i &lt; services.length; i++) \r\n\t\t{\r\n\t\t\tif (services.options[i].selected) \r\n\t\t\t{\r\n\t\t\t\tserviceIdLength = serviceId.length++;\r\n\t\t\t\tserviceId.options[serviceIdLength].text = \r\n\t\t\t\t\tservices.options[i].text;\r\n\t\t\t\tserviceId.options[serviceIdLength].value = \r\n\t\t\t\t\tservices.options[i].value;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tfunction removeService(serviceId)\r\n\t{\r\n\t\tfor (var i = 0; i &lt; serviceId.length; i++) \r\n\t\t{\r\n\t\t\tif (serviceId.options[i].selected) \r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tserviceId.options[i].text = '';\r\n\t\t\t\tserviceId.options[i].value = '';\r\n\t\t\t\tserviceId.options[i].selected = false;\r\n\t\t\t\tserviceId.options[i].remove();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\tfunction validateAssignInventoryForm()\r\n\t{\r\n\t\t\r\n\t\tvar serviceArr=document.getElementsByName(\"serviceArr[]\");\r\n\t\tlength=serviceArr.length;\r\n\t\tisAnySelected = false;\r\n\t\t\r\n\t\tfor (var i=0;i&lt;length;i++) {=\"\" if=\"\" (servicearr[i].checked=\"=\" true)=\"\" isanyselected=\"true;\" i=\"length;\" }=\"\" var=\"\" servicerequested=\"new\" array();=\"\" inventorieshavingsameservice=\"new\" serviceshavingsameinventory=\"new\" isservicerequested=\"0;\" for=\"\" (var=\"\" value=\"serviceArr[i].value;\" valueelements=\"value.split(\":\");\" inventory=\"valueElements[0];\" service=\"valueElements[1];\" serviceinstance=\"valueElements[2];\" servicerequested[service]=\"serviceInstance;\" (serviceinstance=\"\"&gt; 0)\r\n\t\t\t   isServiceRequested = 1;\r\n\t\t\t   \r\n\t\t\tif (serviceArr[i].checked == true)\r\n\t\t\t{\r\n\t\t\t   if (inventoriesHavingSameService[service] &gt;= 0)\r\n\t\t\t   \tinventoriesHavingSameService[service]=inventoriesHavingSameService[service]+1;\r\n\t\t\t   else \r\n\t\t\t   \tinventoriesHavingSameService[service]=1;\r\n\t\t\t   \r\n\t\t\t   if (servicesHavingSameInventory[inventory] &gt; 0)\r\n\t\t\t   \tservicesHavingSameInventory[inventory]=servicesHavingSameInventory[inventory]+1;\r\n\t\t\t   else\r\n\t\t\t   \tservicesHavingSameInventory[inventory]=1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\t\r\n\t\tif (   (!isAnySelected) &amp;&amp; (isServiceRequested) )\r\n\t\t{\r\n\t\t\talert('Service &amp; inventory requested. But no checkbox is selected');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse if (!isAnySelected)\r\n\t\t{\r\n\t\t\tvar response = confirm('No checkbox is selected, do you want to proceed');\r\n\t\t\tif (!response) return false;\r\n\t\t}\r\n\t\t\r\n\t\tvar errMsg ='';\r\n\t\t\r\n\t\tfor (k=1;k&lt;servicerequested.length;k++) {=\"\" if=\"\" (servicerequested[k]=\"\"&gt;= 0 )\r\n\t\t\t{\t\r\n\t\t\t\tif ( (serviceRequested[k] != inventoriesHavingSameService[k])  )\r\n\t\t\t\t{\r\n\t\t\t\t\tif (serviceRequested[k]&gt;0) \r\n\t\t\t\t\t\terrMsg = errMsg + \"Inventory is not \r\n\t\t\t\t\t\tchecked properly for service \" + k \r\n\t\t\t\t\t\t+\", Requested:\" + serviceRequested[k] +\", \r\n\t\t\t\t\t\tAssigned:\" + inventoriesHavingSameService[k] + \"n\";\r\n\t\t\t\t\telse if (serviceRequested[k]==0 &amp;&amp; inventoriesHavingSameService[k]&gt;0)\r\n\t\t\t\t\t\terrMsg = errMsg + \"Inventory is not \r\n\t\t\t\t\t\tchecked properly for service \" + k \r\n\t\t\t\t\t\t+\", Requested:\" + serviceRequested[k] +\", \r\n\t\t\t\t\t\tAssigned:\" + inventoriesHavingSameService[k] + \"n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\tif (errMsg.length&gt;0)\r\n\t\t{\r\n\t\t\talert(errMsg);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\t\r\n\t\/\/not 100% right, will fix later\r\n\tfunction checkDateFormat()\r\n\t{\r\n\t\tvar pattern = new RegExp(0|1[0-9]\/[0-3][0-9]\/[0-9][0-9]);\r\n\t\tif(document.getElementById('timestampStarted').value.match(pattern))\r\n\t\t{\r\n\t\t\tvar date_array = document.getElementById('timestampStarted').value.split('\/');\r\n\t\t\t\r\n\t\t\tvar month = date_array[0];\r\n\t\t\tvar day = date_array[1];\r\n\t\t\tvar year = date_array[2];\r\n\r\n\t\t\t\/\/ This instruction will create a date object\r\n\t\t\tsource_date = new Date(year,month,day);\r\n\t\r\n\t\t\tif(month != source_date.getMonth())\r\n\t\t\t{\r\n\t\t\t\talert('Month is not valid!');\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\r\n\t\t\tif(day != source_date.getDate())\r\n\t\t\t{\r\n\t\t\t\talert('Day is not valid!');\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(year != source_date.getYear())\r\n\t\t\t{\r\n\t\t\t\talert('Year is not valid!');\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\talert('Date format is not valid!');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\r\n\t\treturn true;\r\n\t}\r\n\r\n\t\/\/used by assignService.php\r\n\tfunction initializeServiceInstanceArr()\r\n\t{\r\n\t\tif (serviceInstancesArrAtLoad.length == 0)\r\n\t\t\tserviceInstancesArrAtLoad=document.getElementsByName(\"serviceInstances[]\");\r\n\t\tlength=serviceInstancesArrAtLoad.length;\r\n\r\n\t\tfor(i=0;i&lt;length;i++) {=\"\" temparr[i]=\"serviceInstancesArrAtLoad[i].value;\" }=\"\" used=\"\" by=\"\" assignservice.php=\"\" temparr=\"\" is=\"\" filled=\"\" up=\"\" at=\"\" the=\"\" page=\"\" load=\"\" and=\"\" function=\"\" validateassignserviceform(thisform,serviceid)=\"\" var=\"\" flag=\"false;\" with=\"\" (thisform)=\"\" if=\"\" (validate_required(timestampstarted,'start=\"\" date=\"\" must=\"\" be=\"\" out!')=\"=false)\" {timestampstarted.focus();return=\"\" false}=\"\" (checkdateformat()=\"=false)\" {return=\"\" serviceinstancesarratsubmit=\"document.getElementsByName(\"serviceInstances[]\");\" length=\"serviceInstancesArrAtSubmit.length;\" for=\"\" (var=\"\" i=\"0;i&lt;length;i++)\" (serviceinstancesarratsubmit[i].value=\"\" !=\"tempArr[i])\" break;=\"\" (flag)=\"\" service=\"\" id=\"\" checked=\"\" otherwise=\"\" data=\"\" will=\"\" not=\"\" passed=\"\" to=\"\" php=\"\" scripts=\"\" &lt;=\"\" serviceid.length;=\"\" i++)=\"\" serviceid.options[i].selected=\"true;\" return=\"\" true;=\"\" else=\"\" alert('nothing=\"\" has=\"\" been=\"\" changed');=\"\" false;=\"\" checkallinventories2(serviceid)=\"\" servicecheckall=\"document.getElementsByName(\"serviceCheckAll[]\");\" inventorycheckall=\"document.getElementsByName(\"inventoryCheckAll[]\");\" servicearr=\"document.getElementsByName(\"serviceArr[]\");\" lengthinventorycheckall=\"inventoryCheckAll.length;\" lengthservicearr=\"serviceArr.length;\" status=\"false;\" (i=\"0;i&lt;length;i++)\" (servicecheckall[i].value=\"=serviceId)\" lengtharr=\"serviceArr.length;\" (j=\"0;j&lt;lengthArr;j++)\" value=\"serviceArr[j].value;\" valueelements=\"value.split(':');\" (valueelements[1]=\"=serviceId)\" servicearr[j].checked=\"status;\" servicecheckall.checked;=\"\" !servicearr[j].checked;=\"\" (status=\"=false)\" inventoryid=\"valueElements[0];\" alert(inventoryid);=\"\" alert(lengthinventorycheckall);=\"\" (inventorycheckall[i].value=\"=inventoryId)\" inventorycheckall[i].checked=\"false;\" (k=\"0;k&lt;lengthServiceArr;k++)\" value2nd=\"serviceArr[k].value;\" valueelements2nd=\"value2nd.split(':');\" (valueelements2nd[0]=\"=inventoryId)\" (servicearr[k].checked=\"=false)\" (flag=\"=true)\" checkallservices2(inventoryid)=\"\" lengthservicecheckall=\"serviceCheckAll.length;\" (valueelements[0]=\"=inventoryId)\" serviceid=\"valueElements[1];\" servicecheckall[i].checked=\"false;\" (valueelements2nd[1]=\"=serviceId)\" validateemail(=\"\" strvalue)=\"\" objregexp=\"\/(^[a-z]([a-z_.]*)@([a-z_.]*)([.][a-z]{3})$)|\" (^[a-z]([a-z_.]*)@([a-z_.]*)=\"\" (.[a-z]{3})(.[a-z]{2})*$)=\"\" i;=\"\" check=\"\" valid=\"\" email=\"\" objregexp.test(strvalue);=\"\" validateemailcreationform(thisform)=\"\" (validate_required(email,'email=\"\" {email.focus();return=\"\" (validate_required(domain,'email=\"\" domain=\"\" {domain.focus();return=\"\" *emailaddr=\"email.value+'@'+domain.value;\" alert(emailaddr);=\"\" (validateemail(emailaddr)=\"=false)\" {alert('please=\"\" provide=\"\" address');email.focus();return=\"\" false;}*=\"\" (validate_required(password,'password=\"\" {password.focus();return=\"\" (validate_required(password2,'please=\"\" re-enter=\"\" password!')=\"=false)\" {password2.focus();return=\"\" (password.value=\"\" {alert('passwords=\"\" match');password2.focus();return=\"\" *if=\"\" (forwardaddress.value.length=\"\"&gt;0 )\r\n\t\t\t{\r\n\t\t\t\tvar forwardAddresses = forwardAddress.value.split(',');\r\n\t\t\t\tvar length=forwardAddresses.length;\r\n\t\t\t\tfor(var i=0;i&lt;length;i++) {=\"\" alert(forwardaddresses[i]);=\"\" if=\"\" (validateemail(forwardaddresses[i])=\"=false)\" {alert('please=\"\" provide=\"\" valid=\"\" forward=\"\" address');forwardaddress.focus();return=\"\" false;}=\"\" }=\"\" }*=\"\" function=\"\" validatenodecreateform(thisform)=\"\" with=\"\" (thisform)=\"\" (validate_required(name,'name=\"\" must=\"\" be=\"\" filled=\"\" out!')=\"=false)\" {name.focus();return=\"\" false}=\"\" *if=\"\" (validate_required(communityid,'community=\"\" {communityid.focus();return=\"\" false}*=\"\" validatedocsisnodecreateform(thisform)=\"\" (validate_required(nodeid,'node=\"\" {nodeid.focus();return=\"\" (validate_required(docsisservicegroupid,'docsis=\"\" service=\"\" group=\"\" id=\"\" {docsisservicegroupid.focus();return=\"\" validateaddtowhiteblacklistform(thisform)=\"\" (validate_required(email,'email=\"\" {email.focus();return=\"\" (validate_required(addto,'add=\"\" to=\"\" {addto.focus();return=\"\" (validateemail(email.value)=\"=false)\" email=\"\" address');email.focus();return=\"\" var=\"\" passstr=\"&amp;email=\" +email.value+'&amp;addto=\"+addTo.value+\" &amp;emailid=\"+emailId.value;\r\n\t\t\texpandtab(\" maintab',11,passstr);=\"\" validatealiascreateform(thisform)=\"\" (validate_required(alias,'alias=\"\" {alias.focus();return=\"\" (validate_required(destination,'destination=\"\" {destination.focus();return=\"\" ajaxfunction()=\"\" page_request=\"false\" (window.xmlhttprequest)=\"\" mozilla,=\"\" ie7,=\"\" safari=\"\" etc=\"\" xmlhttprequest()=\"\" else=\"\" (window.activexobject)=\"\" ie=\"\" try=\"\" activexobject(\"msxml2.xmlhttp\")=\"\" catch=\"\" (e)=\"\" activexobject(\"microsoft.xmlhttp\")=\"\" return=\"\" false=\"\" page_request;=\"\" changemodeloptions()=\"\" (!page_request)=\"\" false;=\"\" manufacturerid=\"document.getElementById('manufacturerId');\" modelid=\"document.getElementById('modelId');\" lengthmodelid=\"modelId.options.length;\" modelid.removeall();=\"\" page_request.onreadystatechange=\"function()\" if(page_request.readystate=\"=4)\" modelids=\"page_request.responseText;\" modelidarr=\"modelIds.split('~');\" length=\"modelIdArr.length;\" while(modelid.options.length=\"\"&gt;=1)\r\n\t\t\t\t{\r\n\t\t\t\t\tlengthModelId=modelId.options.length;\r\n\t\t\t\t\tmodelId.options[lengthModelId-1]=null;\r\n\t\t\t\t}\r\n      \r\n        \t\tfor(var i=0;i&lt;length-1;i++) {=\"\" values=\"modelIdArr[i].split(':');\" var=\"\" newoption=\"document.createElement(\"option\");\" newoption.value=\"values[0];\" newoption.innerhtml=\"values[1];\" modelid.appendchild(newoption);=\"\" }=\"\" page_request.open('get',=\"\" '=\"\" inventory=\"\" changemodelslist.php?manufacturerid=\"+manufacturerId.value, true)\r\n\t\tpage_request.send(null)\r\n\t}\r\n\t\r\n\tfunction ajaxFunctionGeneral()\r\n\t{\r\n\t\tvar page_request = false\r\n\r\n\t\tif (window.XMLHttpRequest) \/\/ if Mozilla, IE7, Safari etc\r\n\t\t\tpage_request = new XMLHttpRequest()\r\n\t\telse if (window.ActiveXObject)\r\n\t\t{ \/\/ if IE\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tpage_request = new ActiveXObject(\"Msxml2.XMLHTTP\")\r\n\t\t\t} \r\n\t\t\tcatch (e)\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tpage_request = new ActiveXObject(\"Microsoft.XMLHTTP\")\r\n\t\t\t\t}\r\n\t\t\t\tcatch (e)\r\n\t\t\t\t{\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\t\t\r\n\t\t\treturn false\r\n\t\treturn page_request;\r\n\t}\r\n\r\n\tfunction reboot(deviceId)\r\n\t{\r\n\t\tvar 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)\" response=\"page_request.responseText;\" displayarea=\"document.getElementById('showDiagnosticsResults');\" displayarea.value=\"response;\" diagnostics=\"\" reboot.php?deviceid=\"+deviceId, true)\r\n\t\tpage_request.send(null)\r\n\t}\r\n\t\r\n\tfunction standBy(deviceId)\r\n\t{\r\n\t\tpage_request = ajaxFunctionGeneral();\r\n\t\tif (!page_request) return false;\r\n\t\t\r\n\t\tpage_request.onreadystatechange=function()\r\n      {\r\n      \tif(page_request.readyState==4)\r\n        \t{\r\n        \t\tvar response=page_request.responseText;\r\n        \t\tvar displayArea = document.getElementById(\" showdiagnosticsresults');=\"\" standbystatus.php?deviceid=\"+deviceId, true)\r\n\t\tpage_request.send(null)\r\n\t}\r\n\t\r\n\tfunction changeIpDomainAddress()\r\n\t{\r\n\t\tpage_request = ajaxFunctionGeneral();\r\n\t\tif (!page_request) return false;\t\t\t\t\r\n\t\tvar serverTypeId=document.getElementById(\" servertypeid');=\"\" addressid=\"document.getElementById('addressId');\" addressidlength=\"addressId.options.length;\" modelid.removeall();=\"\" addressids=\"page_request.responseText;\" addressidarr=\"addressIds.split('~');\" length=\"addressIdArr.length;\" while(addressid.options.length=\"\"&gt;=1)\r\n\t\t\t\t{\r\n\t\t\t\t\tlengthAddressId=addressId.options.length;\r\n\t\t\t\t\taddressId.options[lengthAddressId-1]=null;\r\n\t\t\t\t}\r\n      \r\n        \t\tfor(var i=0;i&lt;length-1;i++) {=\"\" values=\"addressIdArr[i].split(':');\" var=\"\" newoption=\"document.createElement(\"option\");\" newoption.value=\"values[0];\" newoption.innerhtml=\"values[1];\" addressid.appendchild(newoption);=\"\" }=\"\" page_request.open('get',=\"\" '=\"\" service=\"\" changeipdomainaddress.php?servertypeid=\"+serverTypeId.value, true)\r\n\t\tpage_request.send(null)\r\n\t}\r\n\r\n\t\r\n\t\r\n\tfunction validateHostingAdministrationForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(serviceName,\" name=\"\" must=\"\" be=\"\" filled=\"\" out!')=\"=false)\" {servicename.focus();return=\"\" false}=\"\" if=\"\" (validate_required(servertypeid,'server=\"\" type=\"\" {servertypeid.focus();return=\"\" function=\"\" validateinventorytypeassignform(thisform)=\"\" with=\"\" (thisform)=\"\" (validate_required(manufacturerid,'manufacturer=\"\" {manufacturerid.focus();return=\"\" (validate_required(modelid,'model=\"\" {modelid.focus();return=\"\" (validate_required(typeid,'type=\"\" {typeid.focus();return=\"\" refreshcanopydiagnostics(id,inventoryid)=\"\" page_request=\"ajaxFunctionGeneral();\" (!page_request)=\"\" return=\"\" false;=\"\" page_request.onreadystatechange=\"function()\" if(page_request.readystate=\"=4)\" response=\"page_request.responseText;\" displayarea=\"document.getElementById('ajaxcontentarea');\" displayarea.innerhtml=\"response;\" inventory=\"\" canopydiagnostics.php?id=\"+id+\" &amp;inventoryid=\"+inventoryId, true)\r\n\t\tpage_request.send(null)\r\n\t}\r\n\t\r\n\tfunction validateDocsisNodeCreateForm(thisform) \r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(nodeName,\" node=\"\" {nodename.focus();return=\"\" (validate_required(docsisservicegroupid,'docsis=\"\" group=\"\" {docsisservicegroupid.focus();return=\"\" validatedocsisdhcpaddresscreateform(thisform)=\"\" with(thisform)=\"\" (validate_required(startipaddress,'start=\"\" ip=\"\" address=\"\" {startipaddress.focus();return=\"\" (validate_required(cmtsinterfacebundleid,'cmts=\"\" interface=\"\" bundle=\"\" {cmtsinterfacebundleid.focus();return=\"\" validatedocsiscmtscreateform(thisform)=\"\" (validate_required(name,'name=\"\" {name.focus();return=\"\" (validate_required(ipaddress,'ip=\"\" {ipaddress.focus();return=\"\" (validate_required(cmtscommunitystring,'community=\"\" string=\"\" {cmtscommunitystring.focus();return=\"\" (validate_required(modemcommunitystring,'modem=\"\" {modemcommunitystring.focus();return=\"\" validatecmtsspeedcreateform(thisform)=\"\" (validate_required(speed,'speed=\"\" {speed.focus();return=\"\" services=\"\" changeservices()=\"\" servicetypeid=\"document.getElementById('serviceTypeId');\" serviceid=\"document.getElementById('serviceId');\" lengthserviceid=\"serviceId.options.length;\" modelid.removeall();=\"\" (page_request.readystate=\"=4)\" serviceids=\"page_request.responseText;\" serviceidarr=\"serviceIds.split('~');\" length=\"serviceIdArr.length;\" while(serviceid.options.length=\"\"&gt;=1)\r\n\t\t\t\t{\r\n\t\t\t\t\tlengthServiceId=serviceId.options.length;\r\n\t\t\t\t\tserviceId.options[lengthServiceId-1]=null;\r\n\t\t\t\t}\r\n      \r\n        \t\tfor(var i=0;i&lt;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)\r\n\t\tpage_request.send(null)\r\n\t}\r\n\t\r\n\tfunction validateServiceSpeedAssignForm(thisForm)\r\n\t{\r\n\t\twith(thisForm)\r\n\t\t{\r\n\t\t\tif (validate_required(serviceId,\" type=\"\" &amp;=\"\" must=\"\" be=\"\" filled=\"\" out!')=\"=false)\" {serviceid.focus();return=\"\" false}=\"\" if=\"\" (validate_required(cmtsspeedid,'cmts=\"\" speed=\"\" {cmtsspeedid.focus();return=\"\" docsis=\"\" function=\"\" validatedocsisservicegroupcreateform(thisform)=\"\" with=\"\" (thisform)=\"\" (validate_required(cmtsvlan,'dhcp=\"\" vlan=\"\" {cmtsvlan.focus();return=\"\" (validate_required(cmtsinterfacename,'interface=\"\" name=\"\" {cmtsinterfacename.focus();return=\"\" (validate_required(cmtsinterfacebundleid,'interface=\"\" bundle=\"\" {cmtsinterfacebundleid.focus();return=\"\" validatedocsisinterfacebundlecreateform(thisform)=\"\" with(thisform)=\"\" (validate_required(name,'interface=\"\" {name.focus();return=\"\" (validate_required(docsiscmtsid,'docsis=\"\" cmts=\"\" {docsiscmtsid.focus();return=\"\" (validate_required(cmtsvlanaddress,'cmts=\"\" address=\"\" {cmtsvlanaddress.focus();return=\"\" validatedocsisinventorycreateform(thisform)=\"\" (validate_required(inventorymodelid,'inventory=\"\" model=\"\" {inventorymodelid.focus();return=\"\" (validate_required(docsisversion,'docsis=\"\" version=\"\" {docsisversion.focus();return=\"\" validatedocsisservicecreateform(thisform)=\"\" (validate_required(serviceid,'service=\"\" (validate_required(downloadspeed,'download=\"\" {downloadspeed.focus();return=\"\" *if=\"\" (validate_required(uploadspeed,'upload=\"\" {uploadspeed.focus();return=\"\" false}*=\"\" validatedocsissettingcreateform(thisform)=\"\" (validate_required(customerid,'customer=\"\" {customerid.focus();return=\"\" (validate_required(overrideconfigfile,'override=\"\" config=\"\" file=\"\" {overrideconfigfile.focus();return=\"\" hosting=\"\" validatecustomerhostingparameters(thisform)=\"\" (validate_required(domainid,'domain=\"\" {domainid.focus();return=\"\" validatehostingsiteusercreateform(thisform)=\"\" (validate_required(username,'site=\"\" user=\"\" {username.focus();return=\"\" (validate_required(password,'site=\"\" password=\"\" {password.focus();return=\"\" (=\"\" password.value.length=\"\" &lt;=\"\" passwordminlength.value=\"\" )=\"\" alert('password=\"\" length=\"\" should=\"\" at=\"\" least=\"\" '+passwordminlength.value);=\"\" password.focus();return=\"\" false=\"\" (password.value.length=\"\"&gt; passwordMaxLength.value)\r\n\t\t\t{alert('Password length should be &lt;= '+passwordMaxLength.value );\r\n\t\t\tpassword.focus();return false}\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\tif (validate_required(password2,'Please re-enter site password !')==false)\r\n\t\t\t{password2.focus();return false}\r\n\t\t\t\r\n\t\t\tif (password.value != password2.value)\r\n\t\t\t{\r\n\t\t\t\talert(\"Site User Passwords must match\");\r\n\t\t\t\tpassword2.focus();\r\n\t\t\t\treturn false\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction validateHostingDomainUserCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(domainId,'Domain name must be \r\n\t\t\tfilled out!')==false)\r\n\t\t\t{domainId.focus();return false}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (validate_required(username,'Domain user name must \r\n\t\t\tbe filled out!')==false)\r\n\t\t\t{username.focus();return false}\r\n\t\t\t\r\n\t\t\tif (validate_required(password,'Domain password must be \r\n\t\t\tfilled out!')==false)\r\n\t\t\t{password.focus();return false}\r\n\t\t\t\t\t\t\r\n\t\t\tif ( password.value.length  &lt; passwordMinLength.value )\r\n\t\t\t{ alert('Password length should be at least '+passwordMinLength.value); \r\n\t\t\t  password.focus();return false }\r\n\t\t\t\r\n\t\t\tif (password.value.length  &gt; passwordMaxLength.value)\r\n\t\t\t{alert('Password length should be &lt;= '+passwordMaxLength.value );\r\n                         password.focus();return false}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (validate_required(password2,'Please re-enter site password !')==false)\r\n\t\t\t{password2.focus();return false}\r\n\t\t\t\r\n\t\t\tif (password.value != password2.value)\r\n\t\t\t{\r\n\t\t\t\talert(\"Domain User Passwords must match\");\r\n\t\t\t\tpassword2.focus();\r\n\t\t\t\treturn false\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t\/\/outage\r\n\tfunction validateOutageCreateForm(thisform)\r\n\t{\r\n\t\twith (thisform)\r\n\t\t{\r\n\t\t\tif (validate_required(subject,'Subject must be filled out!')==false)\r\n\t\t\t{subject.focus();return false}\r\n\t\t\t\r\n\t\t\t\/\/check community selection\r\n\t\t\tvar communityNamesArr=document.getElementsByName(\"communityNames[]\");\r\n\t\t\tlengthArr= communityNamesArr.length;\t\t\t\r\n\t\t\tvar isAnySelected = false;\r\n\t\t\t\r\n\t\t\tfor (var i=0;i<\/pre>\n<p>&nbsp; From: http:\/\/sitestree.com\/?p=3479<br \/> Categories:JavaScript<br \/>Tags:<br \/> Post Data:2016-07-09 20:33:19<\/p>\n<p>\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\">https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\t(Big Data, Cloud, Security, Machine Learning): Courses: <a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"> http:\/\/Training.SitesTree.com<\/a><br \/>\n\t\tIn Bengali: <a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\">http:\/\/Bangla.SaLearningSchool.com<\/a><br \/>\n\t\t<a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\">http:\/\/SitesTree.com<\/a><br \/>\n\t\t8112223 Canada Inc.\/JustEtc: <a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\">http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) <\/a><br \/>\n\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com'> https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\tMedium: <a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"> https:\/\/medium.com\/@SayedAhmedCanada <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>JavaScript is a very powerful scripting language for web-site development. Also, it is in much demand. var serviceInstancesArrAtLoad = Array(); var serviceInstancesArrAtSubmit = Array(); var tempArr=Array(); function validate_required(field,alerttxt) { with (field) { if (value==null||value==&#8221;) { alert(alerttxt);return false } else {return true} } } function validateTicketCreateForm(thisform) { with (thisform) { if (validate_required(type,&#8217;Type must be filled out!&#8217;)== &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=65806\">Continue reading<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-65806","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":65792,"url":"http:\/\/bangla.sitestree.com\/?p=65792","url_meta":{"origin":65806,"position":0},"title":"JavaScript &#8211; Form validation #JavaScript","author":"Author-Check- Article-or-Video","date":"July 14, 2021","format":false,"excerpt":"The code will be helpful in validating data entry forms such as: user registration, user creati on. 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\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":70133,"url":"http:\/\/bangla.sitestree.com\/?p=70133","url_meta":{"origin":65806,"position":1},"title":"Javascript &#8211; Form validation #13","author":"Author-Check- Article-or-Video","date":"August 27, 2021","format":false,"excerpt":"The code will be helpful in validating data entry forms such as: user registration, user creation. validate_required is used by all other functionsfunction 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\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":70137,"url":"http:\/\/bangla.sitestree.com\/?p=70137","url_meta":{"origin":65806,"position":2},"title":"Javascript Codes #13","author":"Author-Check- Article-or-Video","date":"August 27, 2021","format":false,"excerpt":"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}\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10564,"url":"http:\/\/bangla.sitestree.com\/?p=10564","url_meta":{"origin":65806,"position":3},"title":"JavaScript Code","author":"","date":"August 29, 2015","format":false,"excerpt":"\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 var browser=navigator.appName; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 var b_version=navigator.appVersion; <a href=\"http:\/\/www.justetc.net\" target=\"_blank\"> <img border=\"0\" alt=\"hello\" src=\"b_pink.gif\" id=\"b1\" width=\"26\" height=\"26\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" \/> Place the following code under script tag\/in a javascript file function mouseOver() { \u00a0\u00a0 document.getElementById(\"b1\").src =\"b_blue.gif\"; } function mouseOut() { \u00a0\u00a0 document.getElementById(\"b1\").src =\"b_pink.gif\"; } <map name=\"planetmap\"> <area shape =\"rect\" coords =\"0,0,82,126\"\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10548,"url":"http:\/\/bangla.sitestree.com\/?p=10548","url_meta":{"origin":65806,"position":4},"title":"Javascript : Miscellaneous Code","author":"","date":"August 29, 2015","format":false,"excerpt":"\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 var browser=navigator.appName; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 var b_version=navigator.appVersion; <a href=\"http:\/\/www.justetc.net\" target=\"_blank\"> <img border=\"0\" alt=\"hello\" src=\"b_pink.gif\" id=\"b1\" width=\"26\" height=\"26\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" \/> Place the following code under script tag\/in a javascript file function mouseOver() { \u00a0\u00a0 document.getElementById(\"b1\").src =\"b_blue.gif\"; } function mouseOut() { \u00a0\u00a0 document.getElementById(\"b1\").src =\"b_pink.gif\"; } <map name=\"planetmap\"> <area shape =\"rect\" coords =\"0,0,82,126\"\u2026","rel":"","context":"In &quot;Ajax&quot;","block_context":{"text":"Ajax","link":"http:\/\/bangla.sitestree.com\/?cat=1418"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26499,"url":"http:\/\/bangla.sitestree.com\/?p=26499","url_meta":{"origin":65806,"position":5},"title":"JavaScript Code #Programming Code Examples #Javascript #JavaScript","author":"Author-Check- Article-or-Video","date":"April 26, 2021","format":false,"excerpt":"var browser=navigator.appName; var b_version=navigator.appVersion; <a href=\"http:\/\/www.justetc.net\" target=\"_blank\"> <img border=\"0\" alt=\"hello\" src=\"b_pink.gif\" id=\"b1\" width=\"26\" height=\"26\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" \/> Place the following code under script tag\/in a javascript file function mouseOver() { document.getElementById(\"b1\").src =\"b_blue.gif\"; } function mouseOut() { document.getElementById(\"b1\").src =\"b_pink.gif\"; } <map name=\"planetmap\"> <area shape =\"rect\" coords =\"0,0,82,126\" onMouseOver=\"writeText('You are over the\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/65806","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=65806"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/65806\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65806"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65806"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}