Javascript Archives - Nabtron Technology & Programming Guide Mon, 07 May 2018 23:26:23 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.2 https://i0.wp.com/nabtron.com/wp-content/uploads/2018/12/nabtron-icon-50.jpg?fit=32%2C32&ssl=1 Javascript Archives - Nabtron 32 32 13047128 hmac_sha512 to jsSHA https://nabtron.com/hmac_sha512-to-jssha/ https://nabtron.com/hmac_sha512-to-jssha/#comments Sat, 08 Jul 2017 22:29:49 +0000 https://nabtron.com/?p=10458 A quick conversion of hmac_sha512 of php to a javascript library based jsSHA. e.g. if we had the php code: <?php $sign = hash_hmac('sha512', $post_data, $secret); echo $sign; This can be converted to the jsSHA based javascript code like this: var shaObj = new jsSHA("SHA-512", "TEXT"); shaObj.setHMACKey(secret, "TEXT"); shaObj.update(post_data); var hmac = shaObj.getHMAC("HEX"); I hope […]

The post hmac_sha512 to jsSHA appeared first on Nabtron.

]]>
https://nabtron.com/hmac_sha512-to-jssha/feed/ 2 10458
[Solved]How to remove Render-Blocking javascripts https://nabtron.com/solvedhow-to-remove-render-blocking-javascripts/ https://nabtron.com/solvedhow-to-remove-render-blocking-javascripts/#respond Fri, 30 May 2014 07:21:42 +0000 http://nabtron.com/?p=7969 When a browser loads a webpage, while rendering it it has to parse the page. During the parsing process, if the browser comes across an external script it has to download it too which stops the parsing process until the JavaScript file is completely downloaded by the browser. With each file, it has to repeat […]

The post [Solved]How to remove Render-Blocking javascripts appeared first on Nabtron.

]]>
https://nabtron.com/solvedhow-to-remove-render-blocking-javascripts/feed/ 0 7969
Prevent your site from being shown in iFrames using javascript https://nabtron.com/prevent-your-site-from-being-shown-in-iframes-using-javascript/ https://nabtron.com/prevent-your-site-from-being-shown-in-iframes-using-javascript/#respond Wed, 14 May 2014 13:18:59 +0000 http://nabtron.com/?p=7967 Data scraping is one of many pains bloggers and web developers face these days. Someone works hard enough to create a unique content and a unique code or script making their website useful and someone else simply uses iframes to show all their effort on their own website and getting all the credit. Or for […]

The post Prevent your site from being shown in iFrames using javascript appeared first on Nabtron.

]]>
https://nabtron.com/prevent-your-site-from-being-shown-in-iframes-using-javascript/feed/ 0 7967
Javascript auto popup window code https://nabtron.com/javascript-auto-popup-window-code/ https://nabtron.com/javascript-auto-popup-window-code/#comments Tue, 14 Feb 2012 13:45:18 +0000 http://nabtron.com/?p=7462 This javascript auto popup window script will make a small popup window automatically open to your users when a page is loaded. This is great for showing some important messages to the users. Javascript auto popup window code Add this code to the head of your current page to open the popup using javascript. <SCRIPT […]

The post Javascript auto popup window code appeared first on Nabtron.

]]>
https://nabtron.com/javascript-auto-popup-window-code/feed/ 4 7462
Allow numbers/digits only in input box using Javascript https://nabtron.com/allow-numbersdigits-only-in-input-box-using-javascript/ https://nabtron.com/allow-numbersdigits-only-in-input-box-using-javascript/#comments Tue, 22 Nov 2011 08:27:10 +0000 http://nabtron.com/?p=6757 Sometimes we need users to enter only digits / numbers in the input fields (e.g in zip code field) in our forms. In this article you will learn how to restrict any form input field to enter digits or numbers only using javascript. Although this can be by passed in some cases, but it still […]

The post Allow numbers/digits only in input box using Javascript appeared first on Nabtron.

]]>
https://nabtron.com/allow-numbersdigits-only-in-input-box-using-javascript/feed/ 1 6757
How to print javascript Object https://nabtron.com/how-to-print-javascript-object/ https://nabtron.com/how-to-print-javascript-object/#respond Sat, 17 Sep 2011 11:57:56 +0000 http://nabtron.com/?p=6552 While debugging a code it’s useful to print or alert the data stored within an object. By using the code below you can print the data inside the object. You can also save it as a variable and use it your own way like saving it or loading it inside a specific div or an […]

The post How to print javascript Object appeared first on Nabtron.

]]>
https://nabtron.com/how-to-print-javascript-object/feed/ 0 6552
Detect users internet browser (firefox, safari, iphone, ipod, ipad, internet explorer, opera ) and redirect to different page specific to it https://nabtron.com/detect-users-browser-firefox-safari-iphone-ipod-internet-explorer-opera-and-redirect-to-load-different-page-specific-to-that-browser/ https://nabtron.com/detect-users-browser-firefox-safari-iphone-ipod-internet-explorer-opera-and-redirect-to-load-different-page-specific-to-that-browser/#comments Wed, 05 Aug 2009 15:25:56 +0000 http://tech.nabtron.com/?p=281 Some times we need to detect the browser of the user in order to redirect them to browser specific page, or to do any other task that is related to displaying that website for that particular user’s browser, e.g firefox, opera, internet explorer, safari, or are coming from an iphone or an ipod. Edit: You […]

The post Detect users internet browser (firefox, safari, iphone, ipod, ipad, internet explorer, opera ) and redirect to different page specific to it appeared first on Nabtron.

]]>
https://nabtron.com/detect-users-browser-firefox-safari-iphone-ipod-internet-explorer-opera-and-redirect-to-load-different-page-specific-to-that-browser/feed/ 23 281