I have been searching for an answer to the problem I've
been having with a form. I have an HTML file that I load
via a VBScript that is being used to copy CDs to a network
drive. The user will enter the year and the CD number in
the form. Then VBScript creates a folder based on the
information entered and copies the CD to it.

The problem I'm having is that when the Submit button is
clicked the only way I could get the calling VBScript to
take over is to put a MsgBox in the HTML's script area. I
dont mind that except that I would like to have the dialog
box close automatically. I can't use the PopUp function
since IE's security complains. I tried using a For/Next
but that didn't help. What can I do to avoid the MsgBox.
Shown below are snippets from the HTML and VBS files.

Thanks for your help.

===================================================
HTML File (Form section):
===================================================
<form action="" onsubmit="vbscript: CopyDisk()"
method="POST" border="0" width="100%" id="MyForm"
name="MyForm">
<input type="hidden" name="bWaiting" value="TRUE">
<table border="0" width="100%"
<td width="60"> Enter the Year here: &nbsp;&nbsp;<input
type="text" name="Year" id="Year" maxlength="4" size="4"
onkeypress='validate(Me)'</td>
<br>&nbsp;
<td width="860">Enter the CD Number here: &nbsp;&nbsp;
<input type="text" name="CDInfo1" id="CDInfo1"
maxlength="8" size="8" onkeypress='validate(Me)'

===================================================
HTML File (VBS section):
===================================================
<SCRIPT language="VBScript">
Sub CopyDisk()
MyForm.bWaiting.value = "FALSE"
If Len( MyForm.Year.value ) > 0 AND Len(
MyForm.CDInfo1.value ) > 0 Then
MsgBox "Now copying the CD. Please wait for the ""Copy
completed...."" message before clicking OK below."
Else
ExitNow()
End If

End Sub

Sub ExitNow()
MyForm.bWaiting.value = "WAIT"
If MsgBox( "Are You Exiting the Input Window?",
(vbQuestion + vbYesNo), "Exit Information" ) = vbNo Then
MyForm.bWaiting.value = "TRUE"
Else
MyForm.bWaiting.value = "FALSE"
End If
End Sub

</SCRIPT>

===================================================
VBS File:
===================================================
Do While NOT (objExplorer.Busy)
Loop

strYear = objDocument.myForm.Year.value
strCDNo = objDocument.myForm.CDInfo1.value

objExplorer.Visible = 0
If Len( strYear ) = 0 OR Len( strCDNo ) = 0 Then
Do Until objDocument.myForm.bWaiting.value <> "WAIT"
wScript.Sleep 750
Loop
If objDocument.myForm.bWaiting.value = "FALSE" Then
Exit Do
ElseIf objDocument.myForm.bWaiting.value = "WAIT" Then
wScript.Sleep 500
objDocument.myForm.bWaiting.value = "TRUE"
End If
Else
On Error Resume Next
strTarget = CNST_RCV_FLDR & "CD" & strYear & "_" &
strCDNo
If NOT objF_Sys.FolderExists( strTarget ) Then
objF_Sys.CreateFolder strTarget
.......

Re: Form Sleep by MikeB

MikeB
Mon Oct 20 18:34:06 CDT 2003

If it's on an Intranet, why not use an HTA so there are no Security Considerations?

"Russell-S" <anonymous@discussions.microsoft.com> wrote in message
news:062001c3975a$e987d570$a101280a@phx.gbl...
> I have been searching for an answer to the problem I've
> been having with a form. I have an HTML file that I load
> via a VBScript that is being used to copy CDs to a network
> drive. The user will enter the year and the CD number in
> the form. Then VBScript creates a folder based on the
> information entered and copies the CD to it.
>
> The problem I'm having is that when the Submit button is
> clicked the only way I could get the calling VBScript to
> take over is to put a MsgBox in the HTML's script area. I
> dont mind that except that I would like to have the dialog
> box close automatically. I can't use the PopUp function
> since IE's security complains. I tried using a For/Next
> but that didn't help. What can I do to avoid the MsgBox.
> Shown below are snippets from the HTML and VBS files.
>
> Thanks for your help.
>
> ===================================================
> HTML File (Form section):
> ===================================================
> <form action="" onsubmit="vbscript: CopyDisk()"
> method="POST" border="0" width="100%" id="MyForm"
> name="MyForm">
> <input type="hidden" name="bWaiting" value="TRUE">
> <table border="0" width="100%"
> <td width="60"> Enter the Year here: &nbsp;&nbsp;<input
> type="text" name="Year" id="Year" maxlength="4" size="4"
> onkeypress='validate(Me)'</td>
> <br>&nbsp;
> <td width="860">Enter the CD Number here: &nbsp;&nbsp;
> <input type="text" name="CDInfo1" id="CDInfo1"
> maxlength="8" size="8" onkeypress='validate(Me)'
>
> ===================================================
> HTML File (VBS section):
> ===================================================
> <SCRIPT language="VBScript">
> Sub CopyDisk()
> MyForm.bWaiting.value = "FALSE"
> If Len( MyForm.Year.value ) > 0 AND Len(
> MyForm.CDInfo1.value ) > 0 Then
> MsgBox "Now copying the CD. Please wait for the ""Copy
> completed...."" message before clicking OK below."
> Else
> ExitNow()
> End If
>
> End Sub
>
> Sub ExitNow()
> MyForm.bWaiting.value = "WAIT"
> If MsgBox( "Are You Exiting the Input Window?",
> (vbQuestion + vbYesNo), "Exit Information" ) = vbNo Then
> MyForm.bWaiting.value = "TRUE"
> Else
> MyForm.bWaiting.value = "FALSE"
> End If
> End Sub
>
> </SCRIPT>
>
> ===================================================
> VBS File:
> ===================================================
> Do While NOT (objExplorer.Busy)
> Loop
>
> strYear = objDocument.myForm.Year.value
> strCDNo = objDocument.myForm.CDInfo1.value
>
> objExplorer.Visible = 0
> If Len( strYear ) = 0 OR Len( strCDNo ) = 0 Then
> Do Until objDocument.myForm.bWaiting.value <> "WAIT"
> wScript.Sleep 750
> Loop
> If objDocument.myForm.bWaiting.value = "FALSE" Then
> Exit Do
> ElseIf objDocument.myForm.bWaiting.value = "WAIT" Then
> wScript.Sleep 500
> objDocument.myForm.bWaiting.value = "TRUE"
> End If
> Else
> On Error Resume Next
> strTarget = CNST_RCV_FLDR & "CD" & strYear & "_" &
> strCDNo
> If NOT objF_Sys.FolderExists( strTarget ) Then
> objF_Sys.CreateFolder strTarget
> .......



Re: Form Sleep by Russell-S

Russell-S
Mon Oct 20 18:47:08 CDT 2003

Thanks, Mike, It is on our intranet. I've not done
anything with HTA before. I'll have to expand my skills
there. However, I'm needing this ASAP, so if you could
give me quick instructions on what I need or point me to
where I can get some simple instructions, I'd very much
appreciate it.

Thanks, again
Russell-S

>-----Original Message-----
>If it's on an Intranet, why not use an HTA so there are
no Security Considerations?
>
>"Russell-S" <anonymous@discussions.microsoft.com> wrote
in message
>news:062001c3975a$e987d570$a101280a@phx.gbl...
>> I have been searching for an answer to the problem I've
>> been having with a form. I have an HTML file that I load
>> via a VBScript that is being used to copy CDs to a
network
>> drive. The user will enter the year and the CD number in
>> the form. Then VBScript creates a folder based on the
>> information entered and copies the CD to it.
>>
>> The problem I'm having is that when the Submit button is
>> clicked the only way I could get the calling VBScript to
>> take over is to put a MsgBox in the HTML's script
area. I
>> dont mind that except that I would like to have the
dialog
>> box close automatically. I can't use the PopUp function
>> since IE's security complains. I tried using a For/Next
>> but that didn't help. What can I do to avoid the MsgBox.
>> Shown below are snippets from the HTML and VBS files.
>>
>> Thanks for your help.
>>
>> ===================================================
>> HTML File (Form section):
>> ===================================================
>> <form action="" onsubmit="vbscript: CopyDisk()"
>> method="POST" border="0" width="100%" id="MyForm"
>> name="MyForm">
>> <input type="hidden" name="bWaiting" value="TRUE">
>> <table border="0" width="100%"
>> <td width="60"> Enter the Year here: <input
>> type="text" name="Year" id="Year" maxlength="4" size="4"
>> onkeypress='validate(Me)'</td>
>> <br>
>> <td width="860">Enter the CD Number here:
>> <input type="text" name="CDInfo1" id="CDInfo1"
>> maxlength="8" size="8" onkeypress='validate(Me)'
>>
>> ===================================================
>> HTML File (VBS section):
>> ===================================================
>> <SCRIPT language="VBScript">
>> Sub CopyDisk()
>> MyForm.bWaiting.value = "FALSE"
>> If Len( MyForm.Year.value ) > 0 AND Len(
>> MyForm.CDInfo1.value ) > 0 Then
>> MsgBox "Now copying the CD. Please wait for
the ""Copy
>> completed...."" message before clicking OK below."
>> Else
>> ExitNow()
>> End If
>>
>> End Sub
>>
>> Sub ExitNow()
>> MyForm.bWaiting.value = "WAIT"
>> If MsgBox( "Are You Exiting the Input Window?",
>> (vbQuestion + vbYesNo), "Exit Information" ) = vbNo Then
>> MyForm.bWaiting.value = "TRUE"
>> Else
>> MyForm.bWaiting.value = "FALSE"
>> End If
>> End Sub
>>
>> </SCRIPT>
>>
>> ===================================================
>> VBS File:
>> ===================================================
>> Do While NOT (objExplorer.Busy)
>> Loop
>>
>> strYear = objDocument.myForm.Year.value
>> strCDNo = objDocument.myForm.CDInfo1.value
>>
>> objExplorer.Visible = 0
>> If Len( strYear ) = 0 OR Len( strCDNo ) = 0 Then
>> Do Until objDocument.myForm.bWaiting.value <> "WAIT"
>> wScript.Sleep 750
>> Loop
>> If objDocument.myForm.bWaiting.value = "FALSE" Then
>> Exit Do
>> ElseIf objDocument.myForm.bWaiting.value = "WAIT"
Then
>> wScript.Sleep 500
>> objDocument.myForm.bWaiting.value = "TRUE"
>> End If
>> Else
>> On Error Resume Next
>> strTarget = CNST_RCV_FLDR & "CD" & strYear & "_" &
>> strCDNo
>> If NOT objF_Sys.FolderExists( strTarget ) Then
>> objF_Sys.CreateFolder strTarget
>> .......
>
>
>.
>

Re: Form Sleep by MikeB

MikeB
Tue Oct 21 10:17:17 CDT 2003

HTAs are still HTML documents. They just run in a different securing model using MsHta.exe instead
of IExplorer.exe. Just for starters, take your existing document WhatEverItIsCalled.HTM and Rename
it To WhatEverItIsCalled.HTA and open it (double click). There is a bit more to it than that, but
that is the start of it, the rest of it is here:

http://msdn.microsoft.com/workshop/author/hta/overview/htaoverview.asp


"Russell-S" <anonymous@discussions.microsoft.com> wrote in message
news:05b901c39764$798aa900$a301280a@phx.gbl...
> Thanks, Mike, It is on our intranet. I've not done
> anything with HTA before. I'll have to expand my skills
> there. However, I'm needing this ASAP, so if you could
> give me quick instructions on what I need or point me to
> where I can get some simple instructions, I'd very much
> appreciate it.
>
> Thanks, again
> Russell-S
>
> >-----Original Message-----
> >If it's on an Intranet, why not use an HTA so there are
> no Security Considerations?
> >
> >"Russell-S" <anonymous@discussions.microsoft.com> wrote
> in message
> >news:062001c3975a$e987d570$a101280a@phx.gbl...
> >> I have been searching for an answer to the problem I've
> >> been having with a form. I have an HTML file that I load
> >> via a VBScript that is being used to copy CDs to a
> network
> >> drive. The user will enter the year and the CD number in
> >> the form. Then VBScript creates a folder based on the
> >> information entered and copies the CD to it.
> >>
> >> The problem I'm having is that when the Submit button is
> >> clicked the only way I could get the calling VBScript to
> >> take over is to put a MsgBox in the HTML's script
> area. I
> >> dont mind that except that I would like to have the
> dialog
> >> box close automatically. I can't use the PopUp function
> >> since IE's security complains. I tried using a For/Next
> >> but that didn't help. What can I do to avoid the MsgBox.
> >> Shown below are snippets from the HTML and VBS files.
> >>
> >> Thanks for your help.
> >>
> >> ===================================================
> >> HTML File (Form section):
> >> ===================================================
> >> <form action="" onsubmit="vbscript: CopyDisk()"
> >> method="POST" border="0" width="100%" id="MyForm"
> >> name="MyForm">
> >> <input type="hidden" name="bWaiting" value="TRUE">
> >> <table border="0" width="100%"
> >> <td width="60"> Enter the Year here: <input
> >> type="text" name="Year" id="Year" maxlength="4" size="4"
> >> onkeypress='validate(Me)'</td>
> >> <br>
> >> <td width="860">Enter the CD Number here:
> >> <input type="text" name="CDInfo1" id="CDInfo1"
> >> maxlength="8" size="8" onkeypress='validate(Me)'
> >>
> >> ===================================================
> >> HTML File (VBS section):
> >> ===================================================
> >> <SCRIPT language="VBScript">
> >> Sub CopyDisk()
> >> MyForm.bWaiting.value = "FALSE"
> >> If Len( MyForm.Year.value ) > 0 AND Len(
> >> MyForm.CDInfo1.value ) > 0 Then
> >> MsgBox "Now copying the CD. Please wait for
> the ""Copy
> >> completed...."" message before clicking OK below."
> >> Else
> >> ExitNow()
> >> End If
> >>
> >> End Sub
> >>
> >> Sub ExitNow()
> >> MyForm.bWaiting.value = "WAIT"
> >> If MsgBox( "Are You Exiting the Input Window?",
> >> (vbQuestion + vbYesNo), "Exit Information" ) = vbNo Then
> >> MyForm.bWaiting.value = "TRUE"
> >> Else
> >> MyForm.bWaiting.value = "FALSE"
> >> End If
> >> End Sub
> >>
> >> </SCRIPT>
> >>
> >> ===================================================
> >> VBS File:
> >> ===================================================
> >> Do While NOT (objExplorer.Busy)
> >> Loop
> >>
> >> strYear = objDocument.myForm.Year.value
> >> strCDNo = objDocument.myForm.CDInfo1.value
> >>
> >> objExplorer.Visible = 0
> >> If Len( strYear ) = 0 OR Len( strCDNo ) = 0 Then
> >> Do Until objDocument.myForm.bWaiting.value <> "WAIT"
> >> wScript.Sleep 750
> >> Loop
> >> If objDocument.myForm.bWaiting.value = "FALSE" Then
> >> Exit Do
> >> ElseIf objDocument.myForm.bWaiting.value = "WAIT"
> Then
> >> wScript.Sleep 500
> >> objDocument.myForm.bWaiting.value = "TRUE"
> >> End If
> >> Else
> >> On Error Resume Next
> >> strTarget = CNST_RCV_FLDR & "CD" & strYear & "_" &
> >> strCDNo
> >> If NOT objF_Sys.FolderExists( strTarget ) Then
> >> objF_Sys.CreateFolder strTarget
> >> .......
> >
> >
> >.
> >



Re: Form Sleep by Russell-S

Russell-S
Tue Oct 21 13:26:18 CDT 2003

I tried that but since the HTML (or HTA) is being called
by a separate VB Script when I do a
objExplorer.Navigate "NameOfHTML.htm" the script just
hangs.

All I really need is a way to have the VB script that's
outside the HTML be able to consistently read one of the
Form hidden Input fields after the Submit button is
clicked. Half the time I get the WSH error
message "Object doesn't support this property or
method: 'myForm', the name of the form in the HTML
file.....It's driving me crazy.

Russell-S

>-----Original Message-----
>HTAs are still HTML documents. They just run in a
different securing model using MsHta.exe instead
>of IExplorer.exe. Just for starters, take your existing
document WhatEverItIsCalled.HTM and Rename
>it To WhatEverItIsCalled.HTA and open it (double click).
There is a bit more to it than that, but
>that is the start of it, the rest of it is here:
>
>http://msdn.microsoft.com/workshop/author/hta/overview/hta
overview.asp
>
>
>"Russell-S" <anonymous@discussions.microsoft.com> wrote
in message
>news:05b901c39764$798aa900$a301280a@phx.gbl...
>> Thanks, Mike, It is on our intranet. I've not done
>> anything with HTA before. I'll have to expand my skills
>> there. However, I'm needing this ASAP, so if you could
>> give me quick instructions on what I need or point me to
>> where I can get some simple instructions, I'd very much
>> appreciate it.
>>
>> Thanks, again
>> Russell-S
>>
>> >-----Original Message-----
>> >If it's on an Intranet, why not use an HTA so there are
>> no Security Considerations?
>> >
>> >"Russell-S" <anonymous@discussions.microsoft.com> wrote
>> in message
>> >news:062001c3975a$e987d570$a101280a@phx.gbl...
>> >> I have been searching for an answer to the problem
I've
>> >> been having with a form. I have an HTML file that I
load
>> >> via a VBScript that is being used to copy CDs to a
>> network
>> >> drive. The user will enter the year and the CD
number in
>> >> the form. Then VBScript creates a folder based on the
>> >> information entered and copies the CD to it.
>> >>
>> >> The problem I'm having is that when the Submit
button is
>> >> clicked the only way I could get the calling
VBScript to
>> >> take over is to put a MsgBox in the HTML's script
>> area. I
>> >> dont mind that except that I would like to have the
>> dialog
>> >> box close automatically. I can't use the PopUp
function
>> >> since IE's security complains. I tried using a
For/Next
>> >> but that didn't help. What can I do to avoid the
MsgBox.
>> >> Shown below are snippets from the HTML and VBS files.
>> >>
>> >> Thanks for your help.
>> >>
>> >> ===================================================
>> >> HTML File (Form section):
>> >> ===================================================
>> >> <form action="" onsubmit="vbscript: CopyDisk()"
>> >> method="POST" border="0" width="100%" id="MyForm"
>> >> name="MyForm">
>> >> <input type="hidden" name="bWaiting" value="TRUE">
>> >> <table border="0" width="100%"
>> >> <td width="60"> Enter the Year here: <input
>> >> type="text" name="Year" id="Year" maxlength="4"
size="4"
>> >> onkeypress='validate(Me)'</td>
>> >> <br>
>> >> <td width="860">Enter the CD Number here:
>> >> <input type="text" name="CDInfo1" id="CDInfo1"
>> >> maxlength="8" size="8" onkeypress='validate(Me)'
>> >>
>> >> ===================================================
>> >> HTML File (VBS section):
>> >> ===================================================
>> >> <SCRIPT language="VBScript">
>> >> Sub CopyDisk()
>> >> MyForm.bWaiting.value = "FALSE"
>> >> If Len( MyForm.Year.value ) > 0 AND Len(
>> >> MyForm.CDInfo1.value ) > 0 Then
>> >> MsgBox "Now copying the CD. Please wait for
>> the ""Copy
>> >> completed...."" message before clicking OK below."
>> >> Else
>> >> ExitNow()
>> >> End If
>> >>
>> >> End Sub
>> >>
>> >> Sub ExitNow()
>> >> MyForm.bWaiting.value = "WAIT"
>> >> If MsgBox( "Are You Exiting the Input Window?",
>> >> (vbQuestion + vbYesNo), "Exit Information" ) = vbNo
Then
>> >> MyForm.bWaiting.value = "TRUE"
>> >> Else
>> >> MyForm.bWaiting.value = "FALSE"
>> >> End If
>> >> End Sub
>> >>
>> >> </SCRIPT>
>> >>
>> >> ===================================================
>> >> VBS File:
>> >> ===================================================
>> >> Do While NOT (objExplorer.Busy)
>> >> Loop
>> >>
>> >> strYear = objDocument.myForm.Year.value
>> >> strCDNo = objDocument.myForm.CDInfo1.value
>> >>
>> >> objExplorer.Visible = 0
>> >> If Len( strYear ) = 0 OR Len( strCDNo ) = 0 Then
>> >> Do Until objDocument.myForm.bWaiting.value
<> "WAIT"
>> >> wScript.Sleep 750
>> >> Loop
>> >> If objDocument.myForm.bWaiting.value = "FALSE"
Then
>> >> Exit Do
>> >> ElseIf objDocument.myForm.bWaiting.value = "WAIT"
>> Then
>> >> wScript.Sleep 500
>> >> objDocument.myForm.bWaiting.value = "TRUE"
>> >> End If
>> >> Else
>> >> On Error Resume Next
>> >> strTarget = CNST_RCV_FLDR & "CD" & strYear & "_"
&
>> >> strCDNo
>> >> If NOT objF_Sys.FolderExists( strTarget ) Then
>> >> objF_Sys.CreateFolder strTarget
>> >> .......
>> >
>> >
>> >.
>> >
>
>
>.
>

Re: Form Sleep by MikeB

MikeB
Tue Oct 21 14:27:30 CDT 2003


"Russell-S" <anonymous@discussions.microsoft.com> wrote in message
news:00ee01c39800$d1bd4550$a501280a@phx.gbl...
> I tried that but since the HTML (or HTA) is being called
> by a separate VB Script when I do a
> objExplorer.Navigate "NameOfHTML.htm" the script just

In your VbScript, if you already have a reference to CreateObject("Wscript.Shell") then

Wsh.Run "NameOfHTA.hta"


of course the above would work with your html file as well because of the default file
association....

> hangs.
>
> All I really need is a way to have the VB script that's
> outside the HTML be able to consistently read one of the
> Form hidden Input fields after the Submit button is
> clicked. Half the time I get the WSH error
> message "Object doesn't support this property or
> method: 'myForm', the name of the form in the HTML
> file.....It's driving me crazy.
>
> Russell-S
>
> >-----Original Message-----
> >HTAs are still HTML documents. They just run in a
> different securing model using MsHta.exe instead
> >of IExplorer.exe. Just for starters, take your existing
> document WhatEverItIsCalled.HTM and Rename
> >it To WhatEverItIsCalled.HTA and open it (double click).
> There is a bit more to it than that, but
> >that is the start of it, the rest of it is here:
> >
> >http://msdn.microsoft.com/workshop/author/hta/overview/hta
> overview.asp
> >
> >
> >"Russell-S" <anonymous@discussions.microsoft.com> wrote
> in message
> >news:05b901c39764$798aa900$a301280a@phx.gbl...
> >> Thanks, Mike, It is on our intranet. I've not done
> >> anything with HTA before. I'll have to expand my skills
> >> there. However, I'm needing this ASAP, so if you could
> >> give me quick instructions on what I need or point me to
> >> where I can get some simple instructions, I'd very much
> >> appreciate it.
> >>
> >> Thanks, again
> >> Russell-S
> >>
> >> >-----Original Message-----
> >> >If it's on an Intranet, why not use an HTA so there are
> >> no Security Considerations?
> >> >
> >> >"Russell-S" <anonymous@discussions.microsoft.com> wrote
> >> in message
> >> >news:062001c3975a$e987d570$a101280a@phx.gbl...
> >> >> I have been searching for an answer to the problem
> I've
> >> >> been having with a form. I have an HTML file that I
> load
> >> >> via a VBScript that is being used to copy CDs to a
> >> network
> >> >> drive. The user will enter the year and the CD
> number in
> >> >> the form. Then VBScript creates a folder based on the
> >> >> information entered and copies the CD to it.
> >> >>
> >> >> The problem I'm having is that when the Submit
> button is
> >> >> clicked the only way I could get the calling
> VBScript to
> >> >> take over is to put a MsgBox in the HTML's script
> >> area. I
> >> >> dont mind that except that I would like to have the
> >> dialog
> >> >> box close automatically. I can't use the PopUp
> function
> >> >> since IE's security complains. I tried using a
> For/Next
> >> >> but that didn't help. What can I do to avoid the
> MsgBox.
> >> >> Shown below are snippets from the HTML and VBS files.
> >> >>
> >> >> Thanks for your help.
> >> >>
> >> >> ===================================================
> >> >> HTML File (Form section):
> >> >> ===================================================
> >> >> <form action="" onsubmit="vbscript: CopyDisk()"
> >> >> method="POST" border="0" width="100%" id="MyForm"
> >> >> name="MyForm">
> >> >> <input type="hidden" name="bWaiting" value="TRUE">
> >> >> <table border="0" width="100%"
> >> >> <td width="60"> Enter the Year here: <input
> >> >> type="text" name="Year" id="Year" maxlength="4"
> size="4"
> >> >> onkeypress='validate(Me)'</td>
> >> >> <br>
> >> >> <td width="860">Enter the CD Number here:
> >> >> <input type="text" name="CDInfo1" id="CDInfo1"
> >> >> maxlength="8" size="8" onkeypress='validate(Me)'
> >> >>
> >> >> ===================================================
> >> >> HTML File (VBS section):
> >> >> ===================================================
> >> >> <SCRIPT language="VBScript">
> >> >> Sub CopyDisk()
> >> >> MyForm.bWaiting.value = "FALSE"
> >> >> If Len( MyForm.Year.value ) > 0 AND Len(
> >> >> MyForm.CDInfo1.value ) > 0 Then
> >> >> MsgBox "Now copying the CD. Please wait for
> >> the ""Copy
> >> >> completed...."" message before clicking OK below."
> >> >> Else
> >> >> ExitNow()
> >> >> End If
> >> >>
> >> >> End Sub
> >> >>
> >> >> Sub ExitNow()
> >> >> MyForm.bWaiting.value = "WAIT"
> >> >> If MsgBox( "Are You Exiting the Input Window?",
> >> >> (vbQuestion + vbYesNo), "Exit Information" ) = vbNo
> Then
> >> >> MyForm.bWaiting.value = "TRUE"
> >> >> Else
> >> >> MyForm.bWaiting.value = "FALSE"
> >> >> End If
> >> >> End Sub
> >> >>
> >> >> </SCRIPT>
> >> >>
> >> >> ===================================================
> >> >> VBS File:
> >> >> ===================================================
> >> >> Do While NOT (objExplorer.Busy)
> >> >> Loop
> >> >>
> >> >> strYear = objDocument.myForm.Year.value
> >> >> strCDNo = objDocument.myForm.CDInfo1.value
> >> >>
> >> >> objExplorer.Visible = 0
> >> >> If Len( strYear ) = 0 OR Len( strCDNo ) = 0 Then
> >> >> Do Until objDocument.myForm.bWaiting.value
> <> "WAIT"
> >> >> wScript.Sleep 750
> >> >> Loop
> >> >> If objDocument.myForm.bWaiting.value = "FALSE"
> Then
> >> >> Exit Do
> >> >> ElseIf objDocument.myForm.bWaiting.value = "WAIT"
> >> Then
> >> >> wScript.Sleep 500
> >> >> objDocument.myForm.bWaiting.value = "TRUE"
> >> >> End If
> >> >> Else
> >> >> On Error Resume Next
> >> >> strTarget = CNST_RCV_FLDR & "CD" & strYear & "_"
> &
> >> >> strCDNo
> >> >> If NOT objF_Sys.FolderExists( strTarget ) Then
> >> >> objF_Sys.CreateFolder strTarget
> >> >> .......
> >> >
> >> >
> >> >.
> >> >
> >
> >
> >.
> >