Date validation is very useful when you want to restrict the user to provide a future date. You can easily compare the date with current date using JavaScript. This tutorial will show you how to check if selected date is greater than today using JavaScript.

By: CodexWorld Feb 20, 2018

You can easily disable mouse right click in the web page, but it will not work in the and IFrame. The main purpose of disabling right click is to prevent the user from saving the PDF or document content. If you want to disable right click in embed tag, JavaScript onmousedown event help to do that easily.

By: CodexWorld Nov 9, 2017

The json_encode() function in PHP provides an easy way to pass an array to JavaScript. Using json_encode() function, you can pass multidimensional array to the JavaScript function and the PHP array can be accessed as a JavaScript object.

By: CodexWorld Oct 5, 2017

Google Maps JavaScript API provides various option to customize the Google Map functionality as per your needs. The marker position change on Google Map is one of them. Using JavaScript you can easily change the position of the marker on Google map without page refresh. Use setPosition() to change the position of the marker on Google Map.

By: CodexWorld Aug 21, 2017

Using jQuery you can automatically convert text field value while typing. Not only the jQuery, here we will show you the three different way to transform text field data to uppercase while typing. You can convert text to uppercase using jQuery or JavaScript or CSS.

By: CodexWorld Jul 26, 2017

Generally, when we get the file size in JavaScript, it returns in bytes format. But if want, you can easily convert file size to human readable format using JavaScript. Use our custom formatFileSize() function to convert the size from bytes to KB, MB, GB, TB, PB, EB, ZB, YB using Javascript.

By: CodexWorld Jul 14, 2017

Before sending the file to the server for upload, it always a good idea to validate the file. Using JavaScript you can easily get the file info and validate in client-side. The following single line of javaScript code, help you to get the file name, size, type, and modified date.

By: CodexWorld Jun 30, 2017

PHP array can be used in JavaScript, whatever the array is a single or multidimensional or indexed or associative array. You can convert PHP array to JavaScript array easily with a single line of code. Using json_encode() function, PHP array can be converted to JavScript array and accessible in JavaScript.

By: CodexWorld Jun 23, 2017

JavaScript window.open() method opens URL in a new browser window. Use _blank in the second parameter of window.open() method to open a URL in a new tab using JavaScript.

By: CodexWorld Apr 15, 2023
keyboard_double_arrow_up