Make:- Honda Model:- CB unicorn Mileage:- 51 Kms Price :-69,000/-(Negotiable) Year:- 2013 Condition:- Used Contact no: 9526138575 E-mai:jayakrishnan.pm.123@gmail.com
Author: smarttips
Convert php array to javascript array
//php array $smarttips_php_array[] = array(‘sijo’,’thomas’,’maprayil’); //covert php array to javascript array var smarttips_js_array = [<?php echo ‘”‘.implode(‘”,”‘, $smarttips_php_array).'”‘ ?>];
unset php session using javascript
It can solved by a simple javasctipt call on click. Use the php command unset() in javascript call. onclick= “<?php unset($_SESSION[‘shareupload’]); ?>”
Html Textarea auto resize using javascript
<script> var observer; if (window.attachEvent) { observer = function (element, event, handler) { element.attachEvent(‘on’+event, handler); }; } else { observer = function (element, event, handler) { element.addEventListener(event, handler, false); }; } function init (maximumHeight) { var text = document.getElementById(‘text’); var maxHeighter=maximumHeight; var olderHeight= text.scrollHeight; var newerHeight; function resize () { text.style.height = ‘auto’; newHeight=…
How to get the current URL in javascript and jquery?
Using the following jQuery script get the current loading URL Jquery -: var href = jQuery(location).attr(‘href’); Javascript-: var href = window.location.pathname; jQuery(document).ready(function() { setTimeout(function() { window.location.href = href; }, 3000); });