?
Solved

Automation of UPLOAD button using JavaScript

Posted on 2000-02-25
3
Medium Priority
?
329 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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 discusses how to implement server side field validation and display customized error messages to the client.
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…
Suggested Courses

741 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