Community discussions

MikroTik App
Topic Author
Posts: 43
Joined: Fri Sep 17, 2010 4:42 pm

Help with Javascript - alogin.html

Fri Sep 17, 2010 4:55 pm


I am trying to place javascript code in the alogin.html page to check to see if session-time-left is less than 24 hours. If the session-time-left is less than 24 hours I would like to change the location.href = '$(link-redirect)' variable to a staic webpage address such as location.href ='' .

Here is the code I have so far:

<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=270,height=400');
$(if login-by != 'trial' && session-time-left < '24:00:00' )
link-redirect = 'http://account.mypage.html' ;

location.href = '$(link-redirect)';

I appreciate anyone's help with this. It's been over 5yrs since I had to do C# programming and have no experience with java.
Last edited by multipath on Wed Oct 06, 2010 8:01 am, edited 1 time in total.
User avatar
MikroTik Support
MikroTik Support
Posts: 24824
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Help with Java - alogin.html

Mon Sep 20, 2010 9:58 am

it's not java, it's javascript. change forum topic title, maybe somebody will help. java is something entirely different
No answer to your question? How to write posts

Who is online

Users browsing this forum: Bing [Bot], didis81, Laxity, sindy and 230 guests