php - Pass value in joomla.submitbutton -
i have made submit button using joomla's button this:
<button onclick="joomla.submitbutton('autoresponder.transfer')">edit</button>
i want pass 'id' along autoresponder's transfer function here. how can that? tried using hidden field this:
<input type="hidden" name="id" value="<?php echo (int) $item['id']; ?>"> <button onclick="joomla.submitbutton('autoresponder.transfer')">edit</button>
but not giving me value. please help!!
1) instead of <button>
use "submit" <input type="submit">
.it work , capture hidden field $_post / $_get
.this works joomla.
before submit form in each handler:
document.getelementbyid("hiddenid").value = "myspecialvalue";
like :
<input id="buttona" type="button" value="do something" onclick="buttona_clickhandler(event);"/> function buttona_clickhandler(event) { document.getelementbyid('hiddenid').value = whatever; document.getelementbyid('theform').submit(); }
2) pass value without form submit can use link . :
<a href="x.php?id='hiddenfieldname'">do </a>
i think solve issue.
Comments
Post a Comment