Tagged: javascript

countdown timer in php 20

countdown timer in php

countdown timer in php $dateFormat = “d F Y — g:i a”; $targetDate = $futureDate;//Change the 25 to however many minutes you want to countdown change date in strtotime $actualDate = $date1; $secondsDiff =...

check canvas empty or not 2

check canvas empty or not

check canvas empty or not <“canvas11″ height=”200px” width=”200px”> <asp:Button runat=”server” ID=”btn1″ Text=”Save” OnClientClick=”checkcanvas();” /> <script type=”text/javascript”> function checkcanvas() { var i = isCanvasTransparent(); //i =true if canvas empty //i =false if canvas has image...

google translate selected language 0

google translate selected language

google translate selected language   A very common problem is to add google translator with already selected language which can be fix by the following code. function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: ‘en’, includedLanguages:...

drupal 6 basic form , create form in drupal 0

drupal 6 basic form , create form in drupal

drupal 6 basic form <?php function test_myform($form_state) { // Access log settings: $options = array(‘1’ => t(‘Enabled’), ‘0’ => t(‘Disabled’)); $form[‘access’] = array( ‘#type’ => ‘fieldset’, ‘#title’ => t(‘Access log settings’), ‘#tree’ => TRUE,...

validation of number in javascript 0

validation of number in javascript

validation of number in javascript function check_number() { var number=document.getElementById(“mobileno”).value; if(isNaN(number)) { alert(“number only”); return false; } else { return true; } }

dynamically add uploading buttons 0

dynamically add uploading buttons

onclick multiple file uploading button,dynamically add uploading buttons <script> var i=6; function generateRow1() { if(i>35) { alert(“no more files are upload”); } else{ var d=document.getElementById(“div1″); d.innerHTML+=”<p><input type=’file’ name=’foods”+i+”‘ size=’6’>”; i++; return false; } return...

javascript for detect browser 0

javascript for detect browser

javascript for detect browser <script language=”javascript” type=”text/javascript”> var nVer = navigator.appVersion; var nAgt = navigator.userAgent; var browserName = navigator.appName; var fullVersion = ”+parseFloat(navigator.appVersion); var majorVersion = parseInt(navigator.appVersion,10); var nameOffset,verOffset,ix; // In Opera, the true...