Scroll to Div functionality is used to scroll the page to a specific element automatically. The page will navigate to a specific section of the page without scrolling manually. The scroll to HTML element feature can be integrated using JavaScript. Use scrollIntoView() method to scroll to an element in JavaScript.

By: CodexWorld Oct 4, 2023

Mostly, the value attribute of the option tag is used in the select box. Besides the option value, custom attributes can be defined in the option tag of the select dropdown. You can also get the custom attribute value from the select box with JavaScript. The attribute value of the selected option can be retrieved using JavaScript easily.

By: CodexWorld Jan 24, 2022

The UPDATE and SET commands help to update existing field values in MySQL. You can use these commands to add/subtract value to/from existing field value in a single query in MySQL. Use the GREATEST() method with the UPDATE and SET command to subtract the value from an existing field in MySQL but not a negative value.

By: CodexWorld Dec 9, 2021

Adding a row number column to the HTML table is very useful to make it user-friendly. If you are using React Bootstrap Table, the serial number column can be added easily. In this example code snippet, we will show you how to add a row number column to React Bootstrap Table in React.js. Use example code to display row numbers in React Bootstrap Table with pagination.

By: CodexWorld Nov 1, 2021

Ordinal number format helps to add st/nd/rd/th suffix to the calendar date. It is also a user-friendly way to represent a date on the web page. Mostly the ordinal suffix is added to the day of the month in a date string. We will create a custom JavaScript function to add st/nd/rd/th format based on the given number using JavaScript.

By: CodexWorld Sep 8, 2021
API

The Site and Secret Keys are required to use Google reCAPTCHA API on the website. Before getting started with Google reCAPTCHA, your website needs to be registered on the Google reCAPTCHA admin panel and generate API keys. Visit the Google reCAPTCHA Admin console and register the domain of your website.

By: CodexWorld Aug 25, 2021

HTML <a> tag is used to open URL in the same window and tab. If you want to open URL with JavaScript, window.open() method allows opening URL in the browser tab or window. You can use _self value in the second parameter of the window.open() method to open URL in the same tab and in the same window with JavaScript.

By: CodexWorld Apr 15, 2023
PHP

Timezone conversion to a specific timezone helps to synchronize different DateTime. It is very useful to balance the server time and the user’s local time. PHP DateTime class provides an easy way to convert a date time stamp to UTC. You can convert any timezone to UTC DateTime using PHP.

By: CodexWorld Oct 2, 2023
PHP

To get only the name of a file, the extension needs to be removed from the filename. You can remove the extension from a filename with PHP. There is a number of ways to remove extension from a string using PHP. In the following example code, we will show you all the possible ways to remove the extension from the filename and extract the original name of the file in PHP.

By: CodexWorld Apr 15, 2021
keyboard_double_arrow_up