Tag: Business Website
jQuery Datatables | Reloading data after filter values are changed
Suppose there are two filters on the screen: Date from Date to We need to reload data of Jquery datatable based on changed filter values. “ Datatable “ plugin for jQuery needs to be called by including AJAX call as
Execute Javascript code on browser back button
Here is sample code to trap browser back button and execute Javascript code on this event: jQuery(document).ready(function($) { if (window.history && window.history.pushState) { $(window).on(‘popstate’, function() {//when back is clicked popstate event executes //code here will execute on back click });
jQuery and HTML5 validations together
When we use HTML5 validation on form fields like required attribute, input type email, pattern attribute etc, then form data is not submitted until all HTML5 validations are passed. But if we associate some jquery code to the submit button
Java | Execute SQL script using Maven
Whenever there is a change in the database whether we are altering database structure or adding/updating data inside database most of the times we create a script file and run it manually. We can automate this process using Maven. Solution:
PHP | strpos() and result compare
strpos($wholeText, $findText) in PHP returns position from which the $findText value starts if it is present in $wholeText. If it is not found then this function returns false. Fun starts when text is found at the very beginning (at position
PHP – Get files modified on a particular date
Solution: In following example we have filtered files which are modified on current date (today’s date): $source= “C:\wamp\www\Files\”; $files = scandir($source); $archiveFiles = array(); foreach($files as $file) { if (!in_array($file,array(“.”,”..”))) { $lastModified = date(‘d/m/y’,filemtime($source . ‘/’ .$file)); IF($lastModified==date(“d/m/y”)) { array_push($archiveFiles, $file);
IE11 – How to view webpage in different IE versions
Follow these steps to view the webpage in different versions of IE: 1. Open IE11. 2. Press F12 key. 3. Click on “Edge” that is displayed to the right side of the console bar. See screenshot below: 4. On clicking
Eclipse Luna | Dark theme and window split
1. You can select a dark theme for Eclipse Lune now: To use the dark theme, go to Window -> Preferences -> General -> Appearance and choose ‘Dark’. 2. Editors can be split horizontally ( CTRL+_ ) or vertically (
FileZilla | How to switch from current editor to other editor
To get Eclipse or any other editor to open the file by default every time you download a file from fileZilla follow these steps: Open terminal and find path from which your editor executes using which command. $ which eclipse