tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ognjen Blagojevic <ogn...@etf.bg.ac.yu>
Subject Re: SV: FORM login, would like error page same as login page
Date Fri, 16 Nov 2007 09:35:14 GMT
Hi Christopher,

Christopher Schultz wrote:
> Please post the code that checks for this parameter.

Here is the code:

   function getUrlParameter(name) {
     name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
     var regexS = "[\\?&]" + name + "=([^&#]*)";
     var regex = new RegExp(regexS);
     var results = regex.exec(window.location.href);
     if (results == null) {
       return "";
     } else {
       return results[1];
     }
   }

...

   if (getUrlParameter('err') == '1') {
     disp('err1', 'inline'); // Displays the error message
   };


Regards,
Ognjen

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message