{"id":26497,"date":"2021-04-26T23:10:07","date_gmt":"2021-04-27T03:10:07","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/javascript-miscellaneous-code-programming-code-examples-javascript-javascript\/"},"modified":"2021-04-26T23:10:07","modified_gmt":"2021-04-27T03:10:07","slug":"javascript-miscellaneous-code-programming-code-examples-javascript-javascript","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=26497","title":{"rendered":"Javascript : Miscellaneous Code #Programming Code Examples #Javascript #JavaScript"},"content":{"rendered":"<div style='padding:20px'>\n<pre style='font-size:12px;padding:10px'>\n                var browser=navigator.appName;\n                var b_version=navigator.appVersion;\n<\/pre>\n<\/div>\n<p>Note: Brought from our old site: http:\/\/www.salearningschool.com\/example_codes\/ on Jan 2nd, 2017 From: http:\/\/sitestree.com\/?p=10180<br \/> Categories:Programming Code Examples, Javascript, JavaScript<br \/>Tags:JavascriptJavaScript<br \/> Post Data:2017-01-02 16:04:23<\/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>var browser=navigator.appName; var b_version=navigator.appVersion; Note: Brought from our old site: http:\/\/www.salearningschool.com\/example_codes\/ on Jan 2nd, 2017 From: http:\/\/sitestree.com\/?p=10180 Categories:Programming Code Examples, Javascript, JavaScriptTags:JavascriptJavaScript Post Data:2017-01-02 16:04:23 Shop Online: https:\/\/www.ShopForSoul.com\/ (Big Data, Cloud, Security, Machine Learning): Courses: http:\/\/Training.SitesTree.com In Bengali: http:\/\/Bangla.SaLearningSchool.com http:\/\/SitesTree.com 8112223 Canada Inc.\/JustEtc: http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) Shop Online: https:\/\/www.ShopForSoul.com\/ Medium: https:\/\/medium.com\/@SayedAhmedCanada<\/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-26497","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":26495,"url":"http:\/\/bangla.sitestree.com\/?p=26495","url_meta":{"origin":26497,"position":0},"title":"GetElementsByName an example: Checkbox #Programming Code Examples #Javascript #JavaScript","author":"Author-Check- Article-or-Video","date":"April 26, 2021","format":false,"excerpt":"<html> <head> <script type=\"text\/javascript\"> function getElements() { var x=document.getElementsByName(\"myInput[]\"); alert(x.length); alert(x[0].value); alert(x[1].value); alert(x[2].value); } <\/script> <\/head> <body> <input name=\"myInput[]\" type=\"checkbox\" size=\"20\" value='10'\/>10 <input name=\"myInput[]\" type=\"checkbox\" size=\"20\" value='20' \/>20 <input name=\"myInput[]\" type=\"checkbox\" size=\"20\" value='30' \/>30 <br \/> <input type=\"button\" onclick=\"getElements()\" value=\"How many elements named 'myInput'?\" \/> <\/body> <\/html> Note: Brought from\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":26499,"url":"http:\/\/bangla.sitestree.com\/?p=26499","url_meta":{"origin":26497,"position":1},"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":[]},{"id":26493,"url":"http:\/\/bangla.sitestree.com\/?p=26493","url_meta":{"origin":26497,"position":2},"title":"JavaScript Form Validation: Validate a Form Collecting Credit Card Information #Programming Code Examples #Javascript #JavaScript","author":"Author-Check- Article-or-Video","date":"April 26, 2021","format":false,"excerpt":"function validateCollectPaymentInformationForm() { var method, name, number, expiry, errMsg errMsg = \"\"; method = document.getElementById('paymentMethod'); name = document.getElementById('txtCCName'); number = document.getElementById('txtCCNumber'); if (method.value == \"\" || method.value == \"0\" || method.value == null){ errMsg = \"Please select a payment method n\"; } if (name.value == \"\" || name.value == null){\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":27156,"url":"http:\/\/bangla.sitestree.com\/?p=27156","url_meta":{"origin":26497,"position":3},"title":"Javascript : Miscellaneous Code #Programming Code Examples #Java\/J2EE\/J2ME #Ajax","author":"Author-Check- Article-or-Video","date":"May 12, 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":[]},{"id":26501,"url":"http:\/\/bangla.sitestree.com\/?p=26501","url_meta":{"origin":26497,"position":4},"title":"Driver template to create and start a Thread object. #Programming Code Examples #Javascript #Java Threads","author":"Author-Check- Article-or-Video","date":"April 26, 2021","format":false,"excerpt":"\/** Taken from Core Web Programming from * Prentice Hall and Sun Microsystems Press, * \u00a9 2001 Marty Hall and Larry Brown; * may be freely used or adapted. *\/ public class DriverClass extends SomeClass { ... public void startAThread() { \/\/ Create a Thread object. ThreadClass thread = new\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":65786,"url":"http:\/\/bangla.sitestree.com\/?p=65786","url_meta":{"origin":26497,"position":5},"title":"How to implement multiple tab webpages in Ajax and JavaScript #JavaScript","author":"Author-Check- Article-or-Video","date":"July 14, 2021","format":false,"excerpt":"The following two examples will demonstrate how to use JavaScript and\/or ajax to implement mult iple tab webpages. http:\/\/www.dynamicdrive.com\/dynamicindex17\/ajaxtabscontent\/ http:\/\/www.barelyfitz.com\/projects\/tabber\/example2.html I have used the first code extensively in one of my applications. The basic ides is: you define a div section. On each click, you change the contents of that\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\/26497","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=26497"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/26497\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26497"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}