Community discussions

MikroTik App
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

hotspot's status.html is always popup

Sun Feb 09, 2014 1:15 pm

Hello,

When i login, the hotspot's status.html is always popup, and I have already set<input type="hidden" name="popup" value="false" /> in login.html. I know two places in the login.html, and cleared IE's cache, cookie etc.

can anybody help me? thanks a lot!
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: hotspot's status.html is always popup

Sun Feb 09, 2014 2:47 pm

Are you certain that page you modified is being used? When you get the login.html page displayed, select "view page source" or whatever your web browser asks, and see if that popup tag is set to false.

The only other place I see any reference to the status page is in "/ip hotspot user profile".
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

Re: hotspot's status.html is always popup

Mon Feb 10, 2014 4:56 am

I checked the "login.html" page, it should be no problem.
At the "/ip hotspot user profile" I saw "always" and "http login".

I set "/ip hotspot user profile" open status page = http login, when i use my android_phone to login.
the status page popup again. on the computer the status page is not popup. amaze
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

Re: hotspot's status.html is always popup

Sat Mar 15, 2014 7:03 am

I have a new idea, that I want to delete the "status.html" from hotspot folder.
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

Re: hotspot's status.html is always popup

Sat Mar 15, 2014 7:09 am

not to do that
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

Re: hotspot's status.html is always popup

Sat Mar 29, 2014 12:45 am

This problem is still bothering me. Can anybody help me?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: hotspot's status.html is always popup

Sat Mar 29, 2014 2:42 am

You search on wrong pages, the page are: alogin.html
search:
        open('$(link-status)', 'hotspot_status', 'toolbar=0,location=0,directories=0,status=0,menubars=0,resizable=1,width=290,height=200');
replace with:
//        open('$(link-status)', 'hotspot_status', 'toolbar=0,location=0,directories=0,status=0,menubars=0,resizable=1,width=290,height=200');
If I have helped you, please remember to add Karma :)
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

Re: hotspot's status.html is always popup

Wed Apr 02, 2014 3:25 pm

hotspot's status page only popup at mobile phone's explorer for example android, iphone etc.

I edit the alogin.html, and delete the body label onload() Function ,but the status page is still popup.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: hotspot's status.html is always popup

Wed Apr 02, 2014 3:29 pm

hotspot's status page only popup at mobile phone's explorer for example android, iphone etc.

I edit the alogin.html, and delete the body label onload() Function ,but the status page is still popup.
You probably modify wrong alogin.html page.

Have you read my post before?
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

Re: hotspot's status.html is always popup

Thu Apr 03, 2014 12:38 am

after I saw your post, I noticed the function and modified them.

But I did not understand your code, sorry.
Would you speak me clearly? thanks a lot !!
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: hotspot's status.html is always popup

Thu Apr 03, 2014 12:47 am

after I saw your post, I noticed the function and modified them.

But I did not understand your code, sorry.
Would you speak me clearly? thanks a lot !!
do not remove onload,

go on previous line and you found "open('$(link-status)'......"

simply put "//" at the start of the line where "open('$(link-status)'......" is
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

Re: hotspot's status.html is always popup

Thu Apr 03, 2014 1:10 pm

<script language="JavaScript">
<!--
    function startClock() {
        $(if popup == 'true')
        open('$(link-status)', 'hotspot_status', 'toolbar=0,location=0,directories=0,status=0,menubars=0,resizable=1,width=290,height=200');
	$(endif)
	location.href = '$(link-redirect)';
    }
//-->
</script>
</head>
<body onLoad="startClock()">

where do I modify it?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: hotspot's status.html is always popup

Thu Apr 03, 2014 1:39 pm

<script language="JavaScript">
<!--
    function startClock() {
        $(if popup == 'true')
        open('$(link-status)', 'hotspot_status', 'toolbar=0,location=0,directories=0,status=0,menubars=0,resizable=1,width=290,height=200');
	$(endif)
	location.href = '$(link-redirect)';
    }
//-->
</script>
</head>
<body onLoad="startClock()">

where do I modify it?
simply put "//" at the start of the line where "open('$(link-status)'......" is
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

Re: hotspot's status.html is always popup

Mon Apr 07, 2014 11:56 pm

No, it didn't. I don't know why.

When I modified the "alogin.html", I feel it does not work,

no matter how,I modified.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: hotspot's status.html is always popup

Tue Apr 08, 2014 1:10 am

It appears to be the login.html page you need to modify. There are two places that must be changed to insure no popup status page.
You must change <input type="hidden" name="popup" value="true" /> to false.

Here if you use "login-by=http-chap":
$(if chap-id)
	<form name="sendin" action="$(link-login-only)" method="post">
		<input type="hidden" name="username" />
		<input type="hidden" name="password" />
		<input type="hidden" name="dst" value="$(link-orig)" />
		<input type="hidden" name="popup" value="false" />
	</form>
Others use this:
					<form name="login" action="$(link-login-only)" method="post"
					    $(if chap-id) onSubmit="return doLogin()" $(endif)>
						<input type="hidden" name="dst" value="$(link-orig)">
						<input type="hidden" name="popup" value="false">
I have not tried it, so no guarantee.

edit: I just tried it, and it works here with v6.9. Change it to "false" and no status popup. To verify it has been changed, select "view source" on the login.html page.
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

Re: hotspot's status.html is always popup

Tue Apr 08, 2014 11:13 pm

I have not tried it what you told me. But I think that I can not see the html's souce code on the mobile phone.
eg. Andorid etc.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: hotspot's status.html is always popup

Tue Apr 08, 2014 11:41 pm

Is a mobile phone the only device you have? It doesn't matter if a cellphone or a laptop. Try it with a laptop and view the source. If the page has popup set to false, then it should be false for every device that loads the login.html page.
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

Re: hotspot's status.html is always popup

Thu Apr 10, 2014 4:55 pm

the login page has popup set to false;
the ip>hotspot> server profile login by"http-chap", "cookie"
the ip>hotspot>user profile open status page set to always
the alogin.html onload function was modfied (noted) "//"

All I have done, but the status page always popup .my god!
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: hotspot's status.html is always popup

Thu Apr 10, 2014 11:48 pm

I tried it again with IE and Chrome. Both respond correctly.
If popup is true, you get a status.html popup.
If popup is false, you don't.

RB433AH ROS V6.9
I have "login-by=http-chap".

Insure you are modifying the correct file.
hotspot/login.html

Did you do the "view source" as I suggested? Does it show the popup hidden input as false in both places?

Does it display the popup when you use the cookie to login or with the login page too?

edit: The method rextended recommended blocks both http-chap and cookie popups without modifying the login.html page. I just tested it with both the login page and cookie login. Nice!
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

Re: hotspot's status.html is always popup

Fri Apr 11, 2014 1:06 am

There are no problem with IE and Chrome. I can set them to popup status and not.

No matter how I set, the status page only popup on the android system, It has just inconvenience to users, Android system's explorer is not easy to operate. Users do not know how to operate at the status page popup. Not easy to close this page.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: hotspot's status.html is always popup

Fri Apr 11, 2014 2:06 am

Then try removing all of this from the alogin.html page:
        $(if popup == 'true')
        open('$(link-status)', 'hotspot_status', 'toolbar=0,location=0,directories=0,status=0,menubars=0,resizable=1,width=290,height=200');
   $(endif)
If there is no command to open the status page, it shouldn't open.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: hotspot's status.html is always popup

Fri Apr 11, 2014 9:58 am

Then try removing all of this from the alogin.html page:
        $(if popup == 'true')
        open('$(link-status)', 'hotspot_status', 'toolbar=0,location=0,directories=0,status=0,menubars=0,resizable=1,width=290,height=200');
   $(endif)
If there is no command to open the status page, it shouldn't open.
simply put "//" at the start of the line where "open('$(link-status)'......" is
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: hotspot's status.html is always popup

Fri Apr 11, 2014 2:22 pm

simply put "//" at the start of the line where "open('$(link-status)'......" is
The OP said above he tried that and it didn't work. I would suspect at that point the Android is not recognizing the comment slashes or the $if statement.

BTW, nice fix. :D
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: hotspot's status.html is always popup

Sat Apr 12, 2014 12:40 am

simply put "//" at the start of the line where "open('$(link-status)'......" is
The OP said above he tried that and it didn't work. I would suspect at that point the Android is not recognizing the comment slashes or the $if statement.

BTW, nice fix. :D
2nd way
/* open('$(link-status)', 'hotspot_status', 'toolbar=0,location=0,directories=0,status=0,menubars=0,resizable=1,width=290,height=200'); */
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

Re: hotspot's status.html is always popup

Sun Apr 13, 2014 10:23 am

/*

*/
Maybe, I'll try it.
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

Re: hotspot's status.html is always popup

Sat Apr 19, 2014 3:21 am

the hotspot's status.html is always popup, but when I login in by cookie, it didn't pupop.
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

Re: hotspot's status.html is always popup

Sat Apr 19, 2014 3:33 am

I find when i login in, the alogin.html is popup first, then the status.html,
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: hotspot's status.html is always popup

Sat Apr 19, 2014 2:44 pm

Then remove the code from alogin.html as I suggested above.
 
xibai99
newbie
Topic Author
Posts: 36
Joined: Thu Jul 07, 2011 6:23 am

Re: hotspot's status.html is always popup

Thu Dec 18, 2014 12:23 pm

This is my hotspot directory, computer using the hotspot/login.html, the mobile device login using hotspot/lv/login.html. I have already edited the hotspot/lv/alogin.html.
<html>
<head>
<title>mikrotik hotspot > redirect</title>
<meta http-equiv="refresh" content="2; url=$(link-redirect)">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
<style type="text/css">
<!--
textarea,input,select {
	background-color: #FDFBFB;
	border: 1px #BBBBBB solid;
	padding: 2px;
	margin: 1px;
	font-size: 14px;
	color: #808080;
}

body{ color: #737373; font-size: 12px; font-family: verdana; }

a, a:link, a:visited, a:active { color: #AAAAAA; text-decoration: none; font-size: 12px; }
a:hover { border-bottom: 1px dotted #c1c1c1; color: #AAAAAA; }
img {border: none;}
td { font-size: 12px; color: #7A7A7A; }

-->
</style>
<script language="JavaScript">
<!--
    function startClock() {
        location.href = '$(link-redirect)';
    }
//-->
</script>
</head>
<body onLoad="startClock()">
<table width="100%" height="100%">
<tr>
	<td align="center" valign="middle">
	You are logged in
	<br><br>
	If nothing happens, click <a href="$(link-redirect)">here</a></td>
</tr>
</table>
</body>
</html>
This is the mobile device login using hotspot/lv/login.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>internet hotspot > login</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="-1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
body {color: #737373; font-size: 100%; font-family: verdana;}

textarea,input,select {
background-color: #FDFBFB;
border: 1px solid #BBBBBB;
padding: 2px;
margin: 1px;
font-size: 1em;
color: #808080;
}

a, a:link, a:visited, a:active { color: #AAAAAA; text-decoration: none; font-size: 0.625em; }
a:hover { border-bottom: 1px dotted #c1c1c1; color: #AAAAAA; }
img {border: none;}
td { font-size: 1em; color: #7A7A7A; }
.STYLE1 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: bold;
}
</style>

</head>

<body>
$(if chap-id)
	<form name="sendin" action="$(link-login-only)" method="post">
		<input type="hidden" name="username" />
		<input type="hidden" name="password" />
		<input type="hidden" name="dst" value="$(link-orig)" />
		<input type="hidden" name="popup" value="false" />
	</form>
	
	<script type="text/javascript" src="/md5.js"></script>
	<script type="text/javascript">
	<!--
	    function doLogin() {
		document.sendin.username.value = document.login.username.value;
		document.sendin.password.value = hexMD5('$(chap-id)' + document.login.password.value + '$(chap-challenge)');
		document.sendin.submit();
		return false;
	    }
	//-->
	</script>
$(endif)

<table width="100%" style="margin-top: 10%;">
	<tr>
	<td align="center" valign="middle">
		<div class="STYLE1 notice" style="font-size: 1.6em">XXXXXXXX</div><br />
		<table width="280" height="270" style="border: 1px solid #cccccc; padding: 0px;" cellpadding="0" cellspacing="0">
			<tr>
				<td align="center" valign="bottom" height="175" colspan="2">
				<center>请登录后使用</center><br />
					<form name="login" action="$(link-login-only)" method="post"
					    $(if chap-id) onSubmit="return doLogin()" $(endif)>
						<input type="hidden" name="dst" value="$(link-orig)" />
						<input type="hidden" name="popup" value="false" />
						
							<table width="85%" style="background-color: #ffffff">
								<tr>
								  <td width="30%" align="right">用户名</td>
								  <td width="60%"><input style="width: 8em" name="username" type="text" value="$(username)"/></td>
								</tr>
								<tr>
								  <td align="right">密码</td>
										<td><input style="width: 8em" name="password" type="password"/></td>
								</tr>
								<tr><td>&nbsp;</td>
										<td width="40%" align="left"><br /><input type="submit" value="进 入" /></td>
								</tr>
					  </table>
					</form>
				</td>
			</tr>
			<tr><td align="center">$(if error)<div style="color: #FF8080; font-size: 1em">$(error)</div>$(endif)</td></tr>
		</table>
	
	<br />
	<div style="color: #c1c1c1; font-size: 0.8em">Powered by XXXXXXXX 2014 </div>	
	</td>
	</tr>
</table>

<script type="text/javascript">
<!--
  document.login.username.focus();
//-->
</script>
</body>
</html>
but the hotspot's status.html is always popup!
 
romialf
just joined
Posts: 1
Joined: Mon Sep 14, 2020 8:48 pm

Re: hotspot's status.html is always popup

Mon Sep 14, 2020 8:50 pm

how to turn off the redirect is enough to comment
<meta http-equiv="refresh" content="0; url=$(link-redirect)">

Who is online

Users browsing this forum: ckonsultor, jollyrogr and 24 guests