Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 336
  • Last Modified:

Automation of UPLOAD button using JavaScript

In the following code, i want to AUTOMATE 'Upload' button, so that it will keep executing the code at 5 minutes intervals.

I hope and expect that Javascript will do it.

lookiing forward for experts advices.!

-FirAlian

==============

<script language="VBScript">
Sub Select_OnClick
      UploadCtl.Select
End Sub
Sub Remove_OnClick
      UploadCtl.RemoveHighlighted
End Sub
Sub RemoveAll_OnClick
      UploadCtl.RemoveAll
End Sub
Sub Upload_OnClick
      UploadCtl.Upload
End Sub
</script>

<html>

<head>
<title></title>
</head>

<body>

<p>
<object WIDTH="500" HEIGHT="200" ID="UploadCtl"
CLASSID="CLSID:E87F6C8E-16C0-11D3-BEF7-009027438003" CODEBASE="XUpload.ocx">
  <param name="EnablePopupMenu" value="False">
  <param name="ViewServerReply" value="False">
  <param name="Server" value="rntv">
  <param name="Script" value="/v2/xupload/samples/uploadscript.asp">
  <param name="FILE1" value="d:\nemos_pure">
</object>
</p>

<p><input TYPE="BUTTON" NAME="SELECT" VALUE="Select"> <input TYPE="BUTTON" NAME="REMOVE"
VALUE="Remove"> <input TYPE="BUTTON" NAME="REMOVEALL" VALUE="Remove All"> <input
TYPE="button" NAME="UPLOAD" VALUE="Upload"> </p>
</body>
</html>
0
FirAlian
Asked:
FirAlian
  • 2
1 Solution
 
knightEknightCommented:
Which function (sub) do you want to automate?

Try this:

<SCRIPT language='javascript'>
 setTimeout('Upload_OnClick()',300000);  // 300000 milliseconds (5 minutes)
</script>

If that doesn't work, try:   setTimeout('Upload_OnClick',300000);
0
 
knightEknightCommented:
... and if that doesn't work, then do this to the sub:

Sub Upload_OnClick()  ' note the added parenthesis
 UploadCtl.Upload
End Sub

then the first setTimeout method should work.
0
 
FirAlianAuthor Commented:
knightEknight,

You know you helped me a lot today.

i wish i could have some more points to offer you, but i don't have as i am new to this site.

Thanx a lot!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now