Hi there! I have a page that renders all my erros, called errors.jsp (duh!). What I'm trying to do is if the user's session has expired, I'll forward him using a javascript, after an alert: Here's how my code looks like:

<SCRIPT>
function sessionExpired(){
alert("<html:errors property="sessionExpiredString"/>");
top.frames.location="index.jsp";
}
function refreshScreen() {
<html:errors property="sessionExpiredFunction"/>
}
</SCRIPT>

Now, let's suppose the session has expired: the code displays this:

<SCRIPT>
        function sessionExpired(){
                alert("
Session expired! Please login again!

");
                top.frames.location="index.jsp";
        }
        function refreshScreen() {

sessionExpired();


} </SCRIPT>

As you can see, errors property sessionExpiredFunction writes the function to be called. and the
errosExpiredString, the warning string. Problem is, I have a new line, before and after it, invalidating my alert() method.
Any way to solve this? Or maybe a better solution for the problem?


Thanks

Vinicius


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



Reply via email to