Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

output to textarea

Status
Not open for further replies.

robertocarvalho

Programmer
Joined
Mar 11, 2003
Messages
3
Location
BR
Hi. I like to know how to fill a textarea with a result.
My code use VBSCRIPT :

<textarea name=&quot;a&quot; ...

script:

some=frmOne.Text1.value * 2
frmOne.a.value = some

There is no output to textarea, but

some=frmOne.Text1.value * 2
frmOne.a.value = some
msgbox some

&quot;some&quot; appears in textarea until the button OK in message box is pressed, after that the textarea come back to blank.

Any advice will be apprecciated.
Thanks.

 
Works fine for me:
Code:
<html>
  <head>
    <script language=vbscript>
      Sub fill()
        frm.txt.value = &quot;Testing, testing.&quot;
      End Sub
    </script>
  </head>
  <body>
    <form id=frm>
      <textarea id=txt onclick=&quot;fill()&quot;></textarea>
    </form>
  </body>
</html>
Something else going on in your web page?
 
Ok, the code

<textarea id=txt onclick=&quot;fill()&quot;></textarea>

works. But I need fire the procedure with a button pressing, so I use:

<input type=&quot;submit&quot; onclick=&quot;fill ()&quot;>

but the textarea remains blank.
 
Changing the type from submit to button resolves the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top