Click to See Complete Forum and Search --> : Submit button state


AXEmonster
August 18th, 2002, 02:10 PM
I have a submit button which when clicked, processes a form. The entire process takes about 30 seconds. during this time the button stays in the down state

what i want is an alert which pops up when the button resets after the process is complete

how would i do this

more info----------------

i have writtin a .hta (application) using vb script.

i have a function which fires from the button click which writes a text file with the contents of the form.
there is no cgi. its all handled by the client

the form is quite big so the process takes around 30 secs depending on the contents so i need an alert to advise completion.
-----------------------

Function CreateFile()

set fs = CreateObject("Scripting.FileSystemObject")
myFile = form1.FileName.value
Set a = fs.CreateTextFile("C:\" & myFile & ".epc", True)

for i = 0 to 100
b = Form1.txtInput(i).value

if i = 4 then
if trim(varLine) <> "" then
varLine = varLine & b
a.WriteLine(varLine)
end if
varline = ""
elseif i = 9 then
if trim(varLine) <> "" then
varLine = varLine & b
a.WriteLine(varLine)
end if
varline = ""
elseif i = 14 then
if trim(varLine) <> "" then
varLine = varLine & b
a.WriteLine(varLine)
end if

etc---------

goddess_spanky
August 19th, 2002, 10:23 AM
Since you are using client-side VBScript to create the text file, you can use the msgbox() function to display a pop-up when the script completes.

Just place the below example at the end of your script (right before the End Function)

msgbox "The file has been created."

This is only going to work in IE though.