-
June 26th, 2002, 05:04 PM
#1
Member
VBS using a java script delay timer
Hi all I am just looking for a little assistance with a web page that I am designing for tracking tickets at work.
Bassically I need a pop up window to come up after 30 minutes expires,
But I don't want a continius loop tieing up my cpu, and I want to track multiple tickets,
After much research I have found no real solution to making a timer in VBS.
But I have found that I can use java in vbs, but I have not found much more information then that.
I hope some one out there has an idea how to make a java timer to go off after 30 minutes, and add it to my vbs code,
here is what I have so far,
I know there is not much there but any suggestions would be nice,
Thanx
============================================
<HTML>
<INPUT TYPE="BUTTON" NAME="button0" VALUE="Enter Ticket Number">
<INPUT TYPE="edit" NAME="txttick1" VALUE="">> ' this is the ticket numbet
<INPUT TYPE="edit" NAME="txttime1" VALUE="">> 'the time the ticket was added
<INPUT TYPE="edit" NAME="txtcount1" VALUE="">>
' I would like this to have a count down from 30 minutes in it
<SCRIPT LANGUAGE="VBScript" >
Dim min1
Sub button0_onclick
ticketnum = InputBox("Please enter the ticket number to be tracked.")
txttick1.value=ticketnum
End Sub
</SCRIPT >
</HTML>
=================================================
Thanks, I'll see if I can figure that out,
-=Legacy Boy=-
-= You mean there is stuff better then DOS? =-
-
June 26th, 2002, 06:29 PM
#2
Re: VBS using a java script delay timer
Well, this is how you use JavaScript delays:
Code:
<SCRIPT LANGUAGE="JavaScript">
setTimeout("alert()", 1000);
</SCRIPT>
The alert() bit is whatever function you want to put in there, and the 1000 is in miliseconds.
Hope that helps.
-
June 26th, 2002, 06:40 PM
#3
Just a note: Javascript is a html related web based script, while Java is for Applets, Servlets and full applications, it's a complete programming language
-
June 26th, 2002, 07:43 PM
#4
Member
Thanks for the time out code,
And thanks I was well aware that it was for html I am making the tool with VB script and JAVA Script so it can just sit on the H drive and be accessed from anywere
-=Legacy Boy=-
-= You mean there is stuff better then DOS? =-
-
June 26th, 2002, 08:20 PM
#5
Proud is right, there's a huge diffence between java and javascript (one word). I actually deleted a reference to Thread.sleep(long) here
I wish to express my gratitude to the people of Italy. Thank you for inventing pizza.
-
June 26th, 2002, 10:04 PM
#6
Junior Member
Why don't you use the javascript above to call the vb script:
<SCRIPT language="JavaScript">
<!--
setTimeout('window.location = "vbscript url here"', 300000);
//-->
</SCRIPT>
-
June 27th, 2002, 12:49 PM
#7
Member
thanks for the help I got it working Just got to work out the cosmetics,
Thanks
Guys,
-=Legacy Boy=-
-= You mean there is stuff better then DOS? =-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|