Posts Tagged ‘html’

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, ); $form[‘access’][‘log’] = array( ‘#type’ => ‘radios’, ‘#title’ => t(‘Log’), ‘#default_value’ => variable_get(‘log’, 0), ‘#options’ => $options, ‘#description’ => t(‘The log.’), […]

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; } }

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 true; } </script> <input type=”file” checks=”min=1″ size=”6″ id=”fld_photo” name=”fld_photo”> <div id=”div”></div>

Jquery for ajex or jquery for redirecting page function change_service(obj) { jQuery.ajax({ type: “GET”, url: “index.php?option=com_vmcheck&view=default”, data: “&id=”+obj, success: function(html){ jQuery(“#circles”).html(html); } }); } <select tabindex=”50″ name=”s_provider” id=”s_provider” onchange=”change_service(this.value);”> <option>Select Service Provider</option> <option value=”3″>Airtel </option> <option value=”Vodafone”>Vodafone</option> <option value=”Trump”>Trump-MTNL-Mumbai</option> <option value=”1″>Reliance (CDMA)</option> </select>

show and hide dynamic div by jquery

Posted: 8th February 2012 by urfusion in Jquery, Uncategorized
Tags: , , ,

show and hide dynamic div by jquery <script> $(function () { $(“a”).click(function () { var ID = this.id; $(‘.’+ID).toggle(); }); }); </script> <?php $j=0; while($j<=10) { ?><p> <a href=”javascript:void(0);” id=”content<?php echo $j; ?>” class=”team-readmore”>read more.</a> </p> </div> <div style=”display:none”><?php echo stripslashes($getdata[$j][7]); ?></div> <?php $j++; } ?>