I am using a simple HTA application. I have made a drop down box which
has a few values. Depending upon values selected in the drop down box
appropriate message has to be displayed in textarea.

Can anyone help me? I have defined the textarea in the body section. I
am not sure where I have to put the code.

Let me know if possible with code example.

Thanks
Dave

Re: Using Text Area object at run time.. by McKirahan

McKirahan
Tue Sep 12 17:41:37 CDT 2006

"The One" <ankitdave@gmail.com> wrote in message
news:1158098371.862264.97620@e63g2000cwd.googlegroups.com...
> I am using a simple HTA application. I have made a drop down box which
> has a few values. Depending upon values selected in the drop down box
> appropriate message has to be displayed in textarea.
>
> Can anyone help me? I have defined the textarea in the body section. I
> am not sure where I have to put the code.
>
> Let me know if possible with code example.

http://www.aspfaq.com/5003



Re: Using Text Area object at run time.. by mr_unreliable

mr_unreliable
Tue Sep 12 18:00:16 CDT 2006

This is a multi-part message in MIME format.
--------------070209070909050007090606
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

hi oh great one,

There is a demo hta attached that should be what you want.

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)


The One wrote:
> I am using a simple HTA application. I have made a drop down box which
> has a few values. Depending upon values selected in the drop down box
> appropriate message has to be displayed in textarea.
>
> Can anyone help me? I have defined the textarea in the body section. I
> am not sure where I have to put the code.
>
> Let me know if possible with code example.
>
> Thanks
> Dave
>

--------------070209070909050007090606
Content-Type: text/plain;
name="testSelect_wTextarea.hta.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="testSelect_wTextarea.hta.txt"

<html>
<title>myHTA</title>
<!-- hta example by Michael Harris,
posted on vbScript ng, 31Mar02 -->
<hta:application
id="myHTA"
applicationname="myHTA"
singleinstance="yes"
windowstate="normal"
caption="yes"
showintaskbar="yes"
sysmenu="yes"
scroll="no"
/>
<script language="vbscript">
sub selOne_onchange()
if me.selectedIndex = 0 then exit sub

With document.getElementById("txtArea1") ' saves a little typing...
.insertAdjacentText "BeforeEnd", "you selected: " _
& me.options(me.selectedIndex).value & vbCrLf ' add message to listing

' scroll down to show the latest message.
' (ok, so paging down is unsophisticated, but workable)
.doScroll("pageDown")
End With
end sub
</script>

<body>

<SELECT id="selOne" size="1" name="dr1">
<option selected>Select From List</option>
<option value='notepad.exe c:\test.txt'>Use Notepad</option>
<option value='wordpad.exe c:\test.txt'>Use Wordpad</option>
</SELECT>

<BR><BR>

<TEXTAREA id="txtArea1" cols=60 rows=10 ></TEXTAREA>

</body>
</html>
--------------070209070909050007090606--

Re: Using Text Area object at run time.. by The

The
Tue Sep 12 18:25:19 CDT 2006

It worked out.

Thanks for helping out..

Dave


mr_unreliable wrote:
> hi oh great one,
>
> There is a demo hta attached that should be what you want.
>
> cheers, jw
> ____________________________________________________________
>
> You got questions? WE GOT ANSWERS!!! ..(but,
> no guarantee the answers will be applicable to the questions)
>
>
> The One wrote:
> > I am using a simple HTA application. I have made a drop down box which
> > has a few values. Depending upon values selected in the drop down box
> > appropriate message has to be displayed in textarea.
> >
> > Can anyone help me? I have defined the textarea in the body section. I
> > am not sure where I have to put the code.
> >
> > Let me know if possible with code example.
> >
> > Thanks
> > Dave
> >
>
> --------------070209070909050007090606
> Content-Type: text/plain
> Content-Disposition: inline;
> filename="testSelect_wTextarea.hta.txt"
> X-Google-AttachSize: 1044
>
> <html>
> <title>myHTA</title>
> <!-- hta example by Michael Harris,
> posted on vbScript ng, 31Mar02 -->
> <hta:application
> id="myHTA"
> applicationname="myHTA"
> singleinstance="yes"
> windowstate="normal"
> caption="yes"
> showintaskbar="yes"
> sysmenu="yes"
> scroll="no"
> />
> <script language="vbscript">
> sub selOne_onchange()
> if me.selectedIndex = 0 then exit sub
>
> With document.getElementById("txtArea1") ' saves a little typing...
> .insertAdjacentText "BeforeEnd", "you selected: " _
> & me.options(me.selectedIndex).value & vbCrLf ' add message to listing
>
> ' scroll down to show the latest message.
> ' (ok, so paging down is unsophisticated, but workable)
> .doScroll("pageDown")
> End With
> end sub
> </script>
>
> <body>
>
> <SELECT id="selOne" size="1" name="dr1">
> <option selected>Select From List</option>
> <option value='notepad.exe c:\test.txt'>Use Notepad</option>
> <option value='wordpad.exe c:\test.txt'>Use Wordpad</option>
> </SELECT>
>
> <BR><BR>
>
> <TEXTAREA id="txtArea1" cols=60 rows=10 ></TEXTAREA>
>
> </body>
> </html>
> --------------070209070909050007090606--