relative_urls : false, remove_script_host : false, convert_urls : true, LIKE:: <script> tinymce.init({ selector: ‘.rte’, height: 500, …
Read MorePHP
Get TinyMCE to use full image url instead of relative one
#Get TinyMCE to use full image url instead of relative one Make sure in the javascript initialization you are using, that you have these lines …
Read MoreCheck whether server is http or https
# Check whether server is http or https if (!empty($_SERVER[‘HTTPS’]) && (‘on’ == $_SERVER[‘HTTPS’])) { $uri = ‘https://’; } else { $uri = ‘http://’; } …
Read MoreCheck when edit if the field is not duplicate Entry
if($this->input->post(‘user_name’) != $original_value) { $is_unique = ‘|is_unique[users.user_name]’ } else { $is_unique = ” } $this->form_validation->set_rules(‘user_name’, ‘User Name’, ‘required|trim|xss_clean’.$is_unique);
Read MoreHow can I define colors as variables in CSS?
#How can I define colors as variables in CSS? #define a color and use it as a vriable in css Example CSS file :root { …
Read MoreCalculate Date Difference in php
#Date Difference $date_1 = ‘2018-02-16’; $date_1 = ‘2018-02-18’; $dateDifference = dateDifference($date_1, $date_2); print_r($dateDifference); function dateDifference($date_1 , $date_2 , $differenceFormat = ‘%a’ ) { $datetime1 = …
Read MoreSelect all Checkbox in Javascript
Select all Checkbox in Javascript:: <script type=”text/javascript”> $(document).ready(function(){ $(“#checkbx_selectall”).on(‘change’, function() { if(this.checked){ $(‘.__chckbx_select’).each(function(){ …
Read MoreCheck if Field is empty or Not in Javascript
Check if Field is empty or Not in Javascript:: $(“#search-form”).on(‘submit’,function(){ var dis = $(this); searchbox = dis.find(“input[name=’product_name’]”).val(); var submitform = true; $(“#search-form-msg”).css(‘color’,’red’); if(searchbox.trim().length == 0){ …
Read Morefind input by name jquery in a form on submit in Javascript
find input by name jquery in a form on submit in Javascript:: $(“#search-form”).on(‘submit’,function(){ var dis = $(this); searchbox = dis.find(“input[name=’product_name’]”).val(); console.log(searchbox); return false; });
Read More