drupal 6 basic form , create form in drupal

drupal 6 basic form

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

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

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