Monday, May 7, 2018

"joomla.javascript.js" Uncaught TypeError: Cannot set property 'value' of undefined


Error message

joomla.javascript.js:323 Uncaught TypeError: Cannot set property 'value' of undefined
    at submitform (joomla.javascript.js:323)
    at submitbutton (index.php?option=com_xxx:337)
    at HTMLAnchorElement.onclick (VM2845 index.php:167)
submitform @ joomla.javascript.js:323
submitbutton @ index.php?option=com_feed:337
onclick @ VM2845 index.php:167
joomla.javascript.js:323 Uncaught TypeError: Cannot set property 'value' of undefined
    at submitform (joomla.javascript.js:323)
    at submitbutton (index.php?option=com_xxx:334)
    at HTMLAnchorElement.onclick (VM2847 index.php:159)

Solution

Add this line to the form named "adminForm" in your view file (default.php)
<input type="hidden" name="task" value="save" />
 For example :
<form action="index.php" method="post" name="adminForm">
    Do sth here
    <input type="hidden" name="task" value="save" />
    <?php echo JHTML::_('form.token'); ?>
</form>

No comments :

Post a Comment