If you want to implement conditional code based on the class or method, you need to get current class and method name in CodeIgniter. Using the Router Class in CodeIgniter, you can easily get the current controller and method name. The Router class helps to parses URIs and determines routing.

By: CodexWorld Apr 25, 2018

Using minlength and maxlength attributes of HTML5, you can manage input field text length. But if you want to show a custom validation message, it can be done easily with jQuery. Use the example code to implement input text length validation using jQuery.

By: CodexWorld Apr 17, 2018
PHP

The pretty URLs makes webpage URL user-friendly and human readable. Using htaccess file, you can easily create user-friendly URL in the web application. To make URL SEO friendly or user-friendly, you need to create a .htaccess file and define some rewrite rules. The URI segments values can be easily retrieved using PHP.

By: CodexWorld Apr 12, 2018

Placing one image over another image is very easy with CSS. You can easily position an image on top of another image using CSS. Use position, top and left Property in CSS to place an overlay image on the image using HTML and CSS.

By: CodexWorld May 16, 2018

The setTimeout() method executes a function after some specified number of milliseconds. This function is ideal to make an Ajax call after a delay of few seconds. Use window setTimeout() method, you can set a delay in Ajax call for a specific time.

By: CodexWorld Mar 26, 2018
PHP

Regular Expressions (Regex) makes it easy to replace or add attributes to HTML tags in PHP. The preg_replace() function searches string matches to the pattern (regular expression) and replaces with replacement. Use preg_replace() function with regular expression to add attribute to HTML tag using PHP.

By: CodexWorld Mar 13, 2018

Sometimes it needed to check whether a div is visible or hidden before triggering an event. Using jQuery, you can easily detect if a specific element in the web page is hidden or visible. jQuery :visible and :hidden selector is the easiest solution to detect elements visibility.

By: CodexWorld Nov 23, 2018

Generally, server-side language is used to get query string from URL. But you can also get query string parameters from URL to client-side. The query string parameters and values can be easily retrieved from the URL using JavaScript.

By: CodexWorld Feb 22, 2018

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
keyboard_double_arrow_up