Jquery background overlay/alert without .onclick event - php responder?

Posted by Philip on Stack Overflow See other posts from Stack Overflow or by Philip
Published on 2010-05-20T00:33:34Z Indexed on 2010/05/20 0:40 UTC
Read the original article Hit count: 263

Filed under:
|

Hi guys, I have no experience with jquery or javascript for that matter. I am trying to implement this technique to respond to users for errors or messages in general.

lights-out-dimmingcovering-background-content-with-jquery

This method uses the onclick event and that's not what im after, I have tried to replace .onclick with .load but that doesn't seem to work. I'm after a quick fix as I really don't have the time to learn jquery or its event handlers.

The goal is to catch any errors or message's and once these are called the alert box is called without any further actions such as .onclick.

How my code would look:

{PHP}
$forms = new forms();
if(count($forms->showErrors) > 0 // or == true)
{
    foreach($forms->showErrors as $error)
    {
        print('<p class="alert">'.htmlspecialchars($error, ENT_QUOTES).'</p>');
    }
}

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about php