custom error handling

Discussion in 'PHP' started by 3.5supersonic, Jul 7, 2010.

  1. #1
    Hi

    im trying to do a custom error handling like once error happens im calling custom error message with jquery and display

    function error1()
    {
    $('#errorcontainer').load('test.html #error1');
    }
    
    Code (markup):
    this is the error message i have on test.html

    <div id="error1">
    <table class="error1" align="center">
      <tr>
      <td><img src="imgs/alert.png"></td>
        <td>Error xyz</td>
      </tr>
    </table>
    </div>
    
    Code (markup):
    im thinking of store all error messages on one file and call div with jquery load() like above

    problem is i have many error messages and what i have done is make a div and table like above to all errors.

    is there way to do change error message with one div + table? maybe store all errors on a file and load it to above table then load via jquery and display?

    i have no idea how to code like that maybe someone can help, guide me?

    Hope someone can understand question, sorry for language errors :(

    Thanks
     
    3.5supersonic, Jul 7, 2010 IP