I have a custom made login.hml for my hotspot, in fact using quite some CSS and XHTML stuff.
My problem shows up, when entering invalid invalid user/password (in fact, fixed password).
I fire an alert, in case of wrong login, which behaves quite different in various browsers.
The relevant excepts from login.html are:
\
…
$(if error)
$(endif)
I have quite different behaviour in chrome, firefox and IE8. Seems like, the alert somehow executes in a special “environment” regarding to the the CSS, depending upon browser. In FF I see most of real login.html, in IE8 nothing at all of it.
Any ideas ?
One more observation: In case, I reposition the alert-window of IE8 2 times within the browser window, then the background will change from white to be identical to what I receive from FF immediately. So like some trigger or event is missing.
It is hard to see how what is a essentially a server side scripting language could possibly produce different results in different clients, and it’s not a client side problem. The variables and logical constructs get interpolated before the result is sent to the browser and the browser never sees the logic.
You can easily test this. Load the page in Firefox (where it loads right) and click your way through the pop up. Look at the HTML source, copy it, paste it into a new file named ietest.html and upload it to the router. Now you have the exact HTML that works in Firefox with no ‘code’ (variables, ifs etc.). Load that page in IE. Do you get the same error? Then it’s a problem with IE displaying your HTML, and your only option is to adapt your HTML to work in both browsers.
First of all: Even the display in FF is not completely correct, in case of bad login. So my initial posting in this thread was not correct, I have to admit.
Attached the correct, initial login-page. You see, even in FF a few elements are missing, when the alert shows up.
OK, will try to test, as fewi stated. Thanx in advance for this hint.
Although I doubt, that it is s serious test. As far as I unerstand, how it works, the login.html within the browser is updated after error. And the alert is triggered. At the same time, browser might be busy to process all CSS stuff. How to sync …
No. On a failed login the user is again redirected to login.html, but this time the $error variable contains something. All these variables are interpolated by RouterOS and are not sent to the client. The client receives pure HTML, without any variables (only their interpolations).
Edit: from the manual:
The user tries to login by submitting a form that POSTs to ‘/login’ and passes ‘username’ and ‘password’ keys with their respective values.
request for “/login” page
if login procedure has failed (error message is supplied), flogin.html is displayed; if flogin.html is not found, login.html is used
And regarding variable interpolation:
Variable names appear only in the HTML source of the servlet pages - they are automatically replaced with the respective values by the HotSpot Servlet.