Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Automation of UPLOAD button using JavaScript

Posted on 2000-02-25
3
Medium Priority
?
333 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 20 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
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…

609 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