Re: SV: FORM login, would like error page same as login page
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SV: FORM login, would like error page same as login page
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ognjen, Ognjen Blagojevic wrote: var results = regex.exec(window.location.href); Yeah, that's certainly not going to work when a server-side forward. I'm glad you found another solution! - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHPg3v9CaO5/Lv0PARAgylAJ0XaqkOnbwonggSUM4O1r2YzR6MaACeJKbW JKW3We5y8Hi+48jDINDQb14= =u340 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SV: FORM login, would like error page same as login page
So, I created login.html, with username and password fields, and if parameter err=1 is passed, then the error message is displayed. How do you pick up the parameter in the HTML? Using JavaScript? Remember *.html resources are usually not parsed server-side in any way. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SV: FORM login, would like error page same as login page
Wilhelmsen Tor Iver wrote: So, I created login.html, with username and password fields, and if parameter err=1 is passed, then the error message is displayed. How do you pick up the parameter in the HTML? Using JavaScript? Remember *.html resources are usually not parsed server-side in any way. Yes, I'm using JavaScript. I beleive that JavaSrcipt it is okay, because when I try the page alone (/login.html?err=1), it works just fine. Regards, Ognjen - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SV: FORM login, would like error page same as login page
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ognjen, Ognjen Blagojevic wrote: Wilhelmsen Tor Iver wrote: Yes, I'm using JavaScript. I beleive that JavaSrcipt it is okay, because when I try the page alone (/login.html?err=1), it works just fine. Please post the code that checks for this parameter. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHPJmi9CaO5/Lv0PARAoSQAJ0TMAlukfKnr4jcLrzK83X8EoDrrgCfcRPJ Ikcfq1HIlcfaqt7yr9n+Hoc= =hPWi -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]