Custom Error Messages in JS

  • Hi,

    A nice feature would be having the ability to customize the error messages in swfkrpano.js.

    Now the different error messages are spread through the javascript. I like to offer my viewers a more friendly error report the a big red ERROR:
    But at the same time I want swfkrpano to be easy updateable/replaced if a new version comes out.

    So I was thinking of declaring several vars with errormessages at the top of the javascript file
    var error_no_flash = "....."
    var error_corrupt_js = "...."
    var error_noipad = "...."

    or maybe even better, make several divs within krpano container stating the errors. If those divs (id's) are available and not empty use that content, else use the default error message declared in the js.
    <div id="error_no_flash">.....</div>
    <div id="error_corrupt_js">...</div>

    if no errors, use display="none" on those divs.

    Just an idea. It would help with multilanguage support and with creating errors specificly for a certain target group.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!