0
Welcome Guest! Login
0 items Join Now

how to change JERROR to alert?

  • how to change JERROR to alert?

    Posted 15 years 3 months ago
    • Hi!

      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:
      (joomla/libraries/error/error.php)

      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:

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

      OR

      I have disabled the frontpage component, that's where the site errors(ex: when someone forgets to insert login and press LOGIN) appear correct?
      How can i change where the errors appear?

      Search more then 200 sites and i can't find nothing!!!!

      Thanks in advance

Time to create page: 0.064 seconds