Javascript : Joe’s Auto Open Webpage

17 Mar

<HTML><HEAD>

<script language=JavaScript>
{
// self.moveTo(10,10);
// self.resizeTo(200,250);
}
</script>

<script language=”JavaScript”>

<!–

var timerID = 0;
var tStart = null;
var newsecond = 10000 //61000 // 20sec
var i;
var j;
var m;
var k;
var w=1;

function UpdateTimer(j) {
k=j;
if(timerID)
{
clearTimeout(timerID);
clockID = 0;
}

if(!tStart)
tStart = new Date();

var tDate = new Date();
var tDiff = tDate.getTime() – tStart.getTime();

tDate.setTime(tDiff);

if (tDiff > newsecond)
{
//Stop();
Reset();
var ch = parseInt(k);
joe(ch+1);
}

document.theTimer.theCurrent.value = tDiff;
document.theTimer.theTime.value = “” + tDate.getMinutes() + “:” + tDate.getSeconds();
//focus();
timerID = setTimeout(“UpdateTimer(k)”, 1000);
}

function Start(n) {
tStart = new Date();
document.theTimer.theTime.value = “00:00”;

//timerID = setTimeout(“UpdateTimer(i)”, 1000);
UpdateTimer(n);

}

function Stop() {
if(timerID) {
clearTimeout(timerID);
timerID = 0;
}

tStart = null;
}

function Reset() {
tStart = null;

document.theTimer.theTime.value = “00:00”;
}

function loadpopup(m)
{

//winpops = window.open(document.theTimer.theLink.value+m, m,’left=0, top=0, toolbar=1, menubar=1, location=1, status=0, scrollbars=1, resizable=0, width=750, height=500′);
winpops = window.open(document.theTimer.theLink.value+m, 1,’left=0, top=0, toolbar=1, menubar=1, location=1, status=0, scrollbars=1, resizable=0, width=750, height=500′);

}

function joe(i)
{
if(i < document.theTimer.theNumber.value) //default (1) number is less than user number (9)
i=document.theTimer.theNumber.value; //change to user number (9)
document.theTimer.theNext.value = i;
loadpopup(i);
//focus();
Start(i);
}

// –>
</SCRIPT>

</HEAD>

<BODY text=”brown” bgcolor=”gold” ONLOAD=’Stop()’>

<center><form name=”theTimer”><table>
<tr>
<td colspan=3 align=center>
<input type=text name=”theTime” size=4><input type=text name=”theCurrent” size=4>
<br>
<SELECT NAME=”theLink”>
<OPTION VALUE=”http://www.misha-mails.com/scripts/runner.php?PA=”>Misha Mails</OPTION>
</SELECT> <input type=text name=”theNumber” size=2>
<input type=text name=”theNext” size=2>
</td>
</tr>
<tr><td></td></tr>
<tr>
<td>
<input type=button name=”start” value=”Start” onclick=”joe(w)”>
</td>
<td>
<input type=button name=”stop” value=”Stop” onclick=”Stop()”>
</td>
<td>
<input type=button name=”reset” value=”Reset” onclick=”Reset()”>
</td>
</tr>
</table></form></center>

</BODY>
</HTML>

Advertisements

One Response to “Javascript : Joe’s Auto Open Webpage”

  1. pietropiermarini May 9, 2009 at 8:47 am #

    I can not use this script, help me

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: