Strip tags from the string, is very useful when you want to extract text from string that contains HTML tags. You can remove the HTML tags from string using Regex in JavaScript. Use JavaScript replace() method with Regex to remove HTML tags from string.

By: CodexWorld Mar 26, 2020

To add the column sorting functionality, the HTML table style needs to be changed. If you are using the Bootstrap table structure, sort indicator icons can be easily added to the columns. Use CSS to add up/down arrow icons to the table column with Bootstrap.

By: CodexWorld Jan 24, 2020

Progress Bar helps to display the file upload status in real-time. The progress bar is very useful to make the file upload process user-friendly. Use xhr option in the $.ajax() method to get the file upload progress and make a progress bar with percentage using JavaScript.

By: CodexWorld Dec 18, 2019

The Facebook OAuth functionality in the web application can be tested with Development mode. You can use Facebook App in development mode to check the OAuth functionality before making the Facebook login live for production. Go to the Roles => Test Users page and create a new user with the required permissions.

By: CodexWorld Aug 28, 2019

The spinner control is added to the HTML5 number input field to increase or decrease the input value. The arrows can be easily removed from the number field with CSS. Use ::-webkit-inner-spin-button and ::-webkit-outer-spin-button Pseudo-elements to hide arrows from number input field using CSS.

By: CodexWorld Aug 13, 2019

The keyCode property of the KeyboardEvent helps to track the key press on the keyboard using JavaScript. You can easily trigger a button by the Enter key press using JavaScript. Use KeyboardEvent keyCode property to trigger button click for submitting form or input field value with JavaScript.

By: CodexWorld Jun 28, 2019
PHP

The preg_match() function is the best option to extract text between HTML tags with REGEX in PHP. If you want to get content between tags, use regular expressions with preg_match() function in PHP. You can also extract the content inside element based on class name or ID using PHP.

By: CodexWorld May 21, 2019

If you use jQuery click like event in the Ajax loaded content, it will not work in a normal scenario. The jQuery events need to be bind properly in the dynamic content loaded by the Ajax request. Use jQuery delegation to attach an event in the dynamically created content by Ajax.

By: CodexWorld Dec 6, 2021
PHP

Password strength validation is very useful to check whether the password is strong. Strong password makes the user’s account secure and helps to prevent account hack. Using Regex (Regular Expression), you can easily validate the password strength in PHP. Use preg_match() function with Regular Expression to validate password strength in PHP.

By: CodexWorld Jan 6, 2022
keyboard_double_arrow_up