<script> $(document).ready(function() { $(document).on(“click”, “._SP12_SHOWMORE”, function() { var datastring = {‘SRCON’:SMJX_ON, ‘LCNT’:SMJX_LST_CNT,}; // FIRST AJAX REQUEST:: $.ajax({ url:'<?php echo base_url().”search-rd”;?>’, type: …
Read MoreHow to check if the request is an AJAX request with PHP
if (!empty($_SERVER[‘HTTP_X_REQUESTED_WITH’]) && strtolower($_SERVER[‘HTTP_X_REQUESTED_WITH’]) == ‘xmlhttprequest’ ) { // This is ajax request. // write your code here. }
Read Morepagination with scroll using ajax
HTML PAGE IS HERE: IN CODEIGNITER:: <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”utf-8″> <title>Show More Testing</title> <style type=”text/css”> ::selection{ background-color: #E13300; color: white; } ::moz-selection{ …
Read Morecount duplicate values in array in php
<?php $name= array(“raj”,”dinesh”,”mota”,”kunal”,”sam”,”kunal”,”raj”,”raj”); $res = array_count_values($name); print_r($res); It shows no. of duplicates found against. like: raj => 3 kunal => 2 dinesh => 1 etc …
Read MoreCodeigniter – no input file specified
Change in .htaccess file: RewriteRule ^(.*)$ index.php/$1 [L] to RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
Read MoreDisable ctrl+c,ctrl+u and right click
Disable in the whole document from copy,ctrl+u and right click. <!– Disable ctrl+u & ctrl+c and prevent Right Click –> <script type=”text/javascript” src=”http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js”></script> <script type=”text/javascript”> …
Read MoreHow to avoid conflicts of jquery library
Use This Code To Avoid Conflicts Of Jquery Library Files.. $.noConflict(); As Example: var jq = $.noConflict(); jq(document).ready(function(){ jq(“button”).click(function(){ jq(“p”).text(“jQuery is still working!”); …
Read MoreRefresh page using meta tag
Use this tag in head to refresh the web page. content=30 , it is the time duration in seconds to refresh automatically <meta http-equiv=”refresh” content=”30″>
Read MoreHow to make slug removing whitespaces in php
$data = “new & item @ send to & be”; $data_slug = trim($data); //$search = array(‘/’,’\\’,’:’,’;’,’!’,’@’,’#’,’$’,’%’,’^’,’*’,'(‘,’)’,’_’,’+’,’=’,’|’,'{‘,’}’,'[‘,’]’,'”‘,”‘”,'<‘,’>’,’,’,’?’,’~’,’`’,’&’,’ ‘,’.’); $search = array(‘/’,’\\’,’:’,’;’,’!’,’@’,’#’,’$’,’%’,’^’,’*’,'(‘,’)’,’_’,’+’,’=’,’|’,'{‘,’}’,'[‘,’]’,'”‘,”‘”,'<‘,’>’,’,’,’?’,’~’,’`’,’&’,’.’); $data_slug = str_replace($search, ” “, …
Read More