Geia sou wre Dimitri.

Dimitris Mouchritsas wrote:
we are using <a> elements in our error messages to allow the user to go to the form field when the error message shows up. Obviously this messes up the client side javascript popup message which shows like: <a href="#Username">Username</a> is missing. Is there a way to use a different error message or should we abandon the idea of client side validation?

You could modify the JS file in the struts JARs (cant remember where it is) and modify the code to strip the markup from the alert() *only*. A function to strip markup is



stripTags = function (s) {
    return s?s.replace(/<[^>]+>/g,""):s;
};

so you could modify e.g.

alert(errors);

to


alert(stripTags(errors));


Xeraitismata ston Pitarokili, to Valassopoulo kai to Nikita ;-)

Cheers,

Manos


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to