I have the following code in an HTA file:

<input type="text" size="50" name="Username" value="Username">

I would like to set the value for this input to be generated based
upon the value stored in a file. There is VBScript that runs in this
HTA that stores off this type of information and reads the file when
the form loads.

TIA

Re: Setting the value of an input field by McKirahan

McKirahan
Wed Nov 03 12:39:07 CST 2004

"mosow" <jmosow@yahoo.com> wrote in message
news:d599a62.0411030919.1c8911f8@posting.google.com...
> I have the following code in an HTA file:
>
> <input type="text" size="50" name="Username" value="Username">
>
> I would like to set the value for this input to be generated based
> upon the value stored in a file. There is VBScript that runs in this
> HTA that stores off this type of information and reads the file when
> the form loads.
>
> TIA

Is this what you're looking for? Watch for word-wrap.

<html>
<head>
<title>inputext.hta</title>
<script type="text/vbscript">
Dim strVAR
strVAR = "testing" // assign value from file via FSO
</script>
</head>
<body>
<form name="Formname">
<input type="text" size="50" name="Username" value="Username">
</form>
<script type="text/vbscript">
document.Formname.Username.value = strVAR
</script>
</body>
</html



Re: Setting the value of an input field by John

John
Wed Nov 03 13:21:48 CST 2004


That worked like a champ. Thanks.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!