Joomla - How to convert JERROR in ALERT() errors

  • stblink
  • Novice
  • Novice
  • stblink
  • Posts: 22

Post 3+ Months Ago


I believe i can post this topic here since i think you don't need to be much familiar to Joomla to understand what i want to achieve.

So, Joomla has its own error functions.

This is one of them:

Code: [ Select ]
function & raiseError($code, $msg, $info = null)
      $reference = & JError::raise(E_ERROR, $code, $msg, $info, true);
      return $reference;
  1. function & raiseError($code, $msg, $info = null)
  2.    {
  3.       $reference = & JError::raise(E_ERROR, $code, $msg, $info, true);
  4.       return $reference;
  5.    }

which then is called like this:

Code: [ Select ]
return JError::raiseError(E_ERROR, 'JError:'.JERROR_ILLEGAL_OPTIONS, 'Options for callback not valid');

now my question is.. how can i change the function in order to display a javascript alert() and not to display the error in the page?

Thanks in advance

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 29 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.