[Chilli] Hotspot Login on Mobile Phones
Jos Vos
jos at xos.nl
Wed Nov 11 16:47:54 UTC 2009
On Wed, Nov 11, 2009 at 09:53:00AM +0100, Wichert Akkerman wrote:
> The problem is not javascript. I run a custom portal which does not
> use any javascript and also notice problems with iPods/iPhones. It seems
> that either they do not get a valid DHCP lease, or their TCP traffic is
> misdirected somewhere.
OK, I looked at my changes.
In coova.html there is this piece of code:
==========================================================================
<script type="text/javascript" language="Javascript">
//<!--
function getURLParam(n) {
var s = "";
var href = window.location.href;
if (href.indexOf("?") > -1) {
var qs = href.substr(href.indexOf("?"));
var qsList = qs.split("&");
for (var i = 0; i < qsList.length; i++) {
if (qsList[i].indexOf(n + "=") > -1) {
var pList = qsList[i].split("=");
s = pList[1];
break;
}
}
}
return unescape(s.replace(/\+/g, " "));
}
var loginUrl = getURLParam("loginurl");
window.document.write("<meta http-equiv=\"refresh\" content=\"5; URL="+loginUrl+"\">");
function redirect() { window.location = loginUrl; return false; }
//-->
</script>
==========================================================================
I completely commented this out and removed the "//" lines, so it becomes:
==========================================================================
<!--
<script type="text/javascript" language="Javascript">
function getURLParam(n) {
var s = "";
var href = window.location.href;
if (href.indexOf("?") > -1) {
var qs = href.substr(href.indexOf("?"));
var qsList = qs.split("&");
for (var i = 0; i < qsList.length; i++) {
if (qsList[i].indexOf(n + "=") > -1) {
var pList = qsList[i].split("=");
s = pList[1];
break;
}
}
}
return unescape(s.replace(/\+/g, " "));
}
var loginUrl = getURLParam("loginurl");
window.document.write("<meta http-equiv=\"refresh\" content=\"5; URL="+loginUrl+"\">");
function redirect() { window.location = loginUrl; return false; }
</script>
-->
==========================================================================
IIRC, this solved the problem, at least for the N95. I admit it seems
to be a dirty hack, but it solved my urgent problems and after that I
didn't do any further research (especially because I do not own any of
these phones myself).
I'm happy to hear about a more structural solution.
--
-- Jos Vos <jos at xos.nl>
-- X/OS Experts in Open Systems BV | Phone: +31 20 6938364
-- Amsterdam, The Netherlands | Fax: +31 20 6948204
More information about the Chilli
mailing list