Solved

Automation of UPLOAD button using JavaScript

Posted on 2000-02-25
3
324 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now