VBS using a java script delay timer
Results 1 to 7 of 7

Thread: VBS using a java script delay timer

  1. #1
    Member
    Join Date
    Oct 2001
    Posts
    64

    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=""&GT;> ' this is the ticket numbet
    <INPUT TYPE="edit" NAME="txttime1" VALUE=""&GT;> 'the time the ticket was added
    <INPUT TYPE="edit" NAME="txtcount1" VALUE=""&GT;>
    ' 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? =-

  2. #2
    Senior Member
    Join Date
    Nov 2001
    Location
    Ireland
    Posts
    735

    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.

  3. #3
    Banned
    Join Date
    Sep 2001
    Posts
    68

    Lightbulb

    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

  4. #4
    Member
    Join Date
    Oct 2001
    Posts
    64

    Exclamation

    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? =-

  5. #5
    Hi mom!
    Join Date
    Aug 2001
    Posts
    1,103
    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.

  6. #6
    Junior Member
    Join Date
    Jun 2002
    Posts
    11
    Why don't you use the javascript above to call the vb script:
    <SCRIPT language="JavaScript">
    <!--
    setTimeout('window.location = "vbscript url here"', 300000);
    //-->
    </SCRIPT>
    Shelby Spencer

  7. #7
    Member
    Join Date
    Oct 2001
    Posts
    64
    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
  •