Newbie with a timer question
From: Matt Revenaugh (matt_at_mybogusaccount.com)
Date: 10/24/03
- Next message: Tracy Nelson: "Re: Alternative or help for DCOM using Java?"
- Previous message: Phil...: "Re: ICMP packets"
- Next in thread: Amey Samant: "Re: Newbie with a timer question"
- Reply: Amey Samant: "Re: Newbie with a timer question"
- Reply: Amey Samant: "Re: Newbie with a timer question"
- Reply: Mitch Williams: "Re: Newbie with a timer question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Oct 2003 22:07:52 GMT
OK, so I am a newbie to java. I've been programming for a looong time
though. I am trying to set up a timer that opens a new browser window every
so often. I am trying to avoid using the <META refresh...> tag. But I can
not seem to get the code to work.
Below is the snippet from my web page.
What am I doing wrong. Is it the way I am declaring the classes? Or is it
something deeper that I have not yet learned. Any help from you java gurus
is welcomed!
Matt Revenaugh
Java Newbie
- - - - - - - - -
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
import java.util.Timer;
import java.util.TimerTask;
public class Reminder {
Timer timer;
public Reminder(){
timer = new Timer();
timer.schedule(new RemindTask(), 60000);
}
class RemindTask extends TimerTask {
public void run(){
open("http://www.myurl/mypage.htm", "myRemote", "fullscreen=1");
}
}
public static void main(String[] args){
new Reminder();
}
}
// -->
</SCRIPT>
</HEAD>
<BODY></BODY>
</HTML>
- Next message: Tracy Nelson: "Re: Alternative or help for DCOM using Java?"
- Previous message: Phil...: "Re: ICMP packets"
- Next in thread: Amey Samant: "Re: Newbie with a timer question"
- Reply: Amey Samant: "Re: Newbie with a timer question"
- Reply: Amey Samant: "Re: Newbie with a timer question"
- Reply: Mitch Williams: "Re: Newbie with a timer question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|