Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 17th, 2004, 11:34 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 139
Thanks: 0
Thanked 0 Times in 0 Posts
Default adding a to a variable from a text area

I have a variable that holds a string of instuctions, for example:

str_instruct = "Add 6 cups of water in a pot : Bring water to boil "

now I display that string by doing:

arr_instruct = Split (str_instruct,":")
for i = 0 to UBound(arr_instruct)
    Response.Write (arr_instruct(i)&"<br>")
next

Now here is the quesiton. I have a textarea that allows me to add
further instructions.

How can I, after clicking a button "add", append to the end of the
string the content of the textarea with my test char ":" to the same var
(str_instruct), then have the page reload allowing me to see the new
string and have it displayed

Is this even possible?



 
Old March 17th, 2004, 01:40 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The form action must point the page that is showing this output. Then you just concatenate the value from the textarea onto the string before you split it:

If Request.Form("myTextArea") <> "" Then
    str_instruct = str_instruct & ":" & Request.Form("myTextArea")
End If

arr_instruct = Split (str_instruct,":")
...

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Text area Wenggo VBScript 5 September 20th, 2008 07:21 PM
Submit text to main page from text area... user0b PHP How-To 2 June 30th, 2008 09:52 PM
Need help: Not able to Assign Value to a Text Area steveleong Classic ASP Professional 3 February 20th, 2008 09:15 PM
text area box shoakat Classic ASP Databases 2 September 11th, 2004 07:28 AM
text in limited area alittlebitter32 Dreamweaver (all versions) 4 July 8th, 2004 10:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.