Solved

Automation of UPLOAD button using JavaScript

Posted on 2000-02-25
3
326 Views
Last Modified: 2012-08-14
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
Comment
Question by:FirAlian
  • 2
3 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 2559677
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
 
LVL 33

Accepted Solution

by:
knightEknight earned 5 total points
ID: 2559686
... 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
 

Author Comment

by:FirAlian
ID: 2559811
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question