Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: TextArea Use


Message #1 by Leo Clayton <claytonl@z...> on Fri, 29 Dec 2000 12:49:08 -0500
--=====================_3413368==_.ALT

Content-Type: text/plain; charset="us-ascii"; format=flowed



How do you use the TextArea attribute of the FORM tag?  Examples PLEASE.



I have an Access Table that has a memo field in it (JobHistory, which of 

course has job history info in it).

I SELECT five fields from this table based upon an IDNumber field match.  I 

have a FORM with an HTML table in it that displays/writes the current info 

back to the screen/my browser (so they can see what's currently there, 

don't ask me why) while moving the exact same info to the form field so 

that the user changes only the info that they wish to update/change.  The 

first four fields (which are data type = text) are displayed on the screen 

and move to the form fields just  as I expected/intended.  The last field 

(data type = memo) is displayed on the screen, but is not moved to the form 

field.



Can someone tell me why?



What I really need/want to do is move this memo field data to the FORM  and 

be able to add to what is currently there, if necessary.



Here is my code:

<%

strSQL = "SELECT * FROM EmployeeTable WHERE (IDNumber = 

'"&Session("IDNumber")&"')"

Set DbObj = Server.CreateObject("ADODB.CONNECTION")

DbObj.Open "DSN=EmployeeMaster"

Set oRs = DbObj.Execute(strSQL)

%>



<FORM ACTION="UpdateEmployeeTable4.asp" METHOD="POST" >

<CENTER>



<TABLE BORDER=0>



<TR>

<TD>Current First Name:</TD>

<TD><% =oRs.Fields("FirstName").Value %></TD>

<TD>  </TD>

<TD>New First Name:</TD>

<TD><INPUT TYPE="Text" NAME="FirstName" value="<% 

=oRs.Fields("FirstName").Value %>"></TD>

</TR>



<TR>

<TD>Current Last Name:</TD>

<TD><% =oRs.Fields("LastName").Value %></TD>

<TD>  </TD>

<TD>New Last Name:</TD>

<TD><INPUT TYPE="Text" NAME="LastName" value="<% 

=oRs.Fields("LastName").Value %>"></TD>

</TR>



<TR>

<TD>Current Title:</TD>

<TD><% =oRs.Fields("Title").Value %></TD>

<TD>  </TD>

<%

Session("Title") = oRs("Title")

%>

<TD>New Title:</TD>

<TD><INPUT TYPE="Text" NAME="Title" value="<% =oRs.Fields("Title").Value 

%>"></TD>

</TR>



<TR>

   <TD>Current Education:</TD>

   <TD><% =oRs.Fields("Education").Value %></TD>

   <TD>  </TD>

<%

Session("Education") = oRs("Education")

%>

   <TD>New Education:</TD>

   <TD>

     <INPUT TYPE="Text" NAME="Education" value="<% 

=oRs.Fields("Education").Value %>">

   </TD>

</TR>



<TR>

<TD>Current Job History:</TD>

<TD><% =oRs.Fields("JobHistory").Value %></TD>

<TD>  </TD>

<%

Session("JobHistory") = oRs("JobHistory")

%>

<TD>New Job History:</TD>

<TD><INPUT TYPE="Text" NAME="JobHistory" value="<% 

=oRs.Fields("JobHistory").Value %>"></TD>

</TR>





<TR>

<TD></TD>

<TD ALIGN=CENTER COLSPAN=2><BR>

<INPUT TYPE="Submit" VALUE="Submit Update">  

<INPUT TYPE="RESET"></TD>

</TR>

</TABLE>

</CENTER>

</FORM>









--- 

NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?

Visit EarthWeb for the latest in IT Management, Software Development, 

Web Development, Networking & Communications, and Hardware & Systems.  

Click on http://www.earthweb.com for FREE articles, tutorials,

and discussions from the experts.

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com








Message #2 by pdf@b... on Fri, 29 Dec 2000 13:55:56 -0500
--0__=pQFMLxZiS7jyDUBvoxU1HZRwhw1exqAC0Sgqbyrez2VwiTKejPyDXR8d

Content-type: text/plain; charset=us-ascii

Content-Disposition: inline







Here is the code in question?



<TR>

<TD>Current Job History:</TD>

<TD><% =oRs.Fields("JobHistory").Value %></TD>

<TD>  </TD>

<%

Session("JobHistory") = oRs("JobHistory")

%>

<TD>New Job History:</TD>

<TD><INPUT TYPE="Text" NAME="JobHistory" value="<%

=oRs.Fields("JobHistory").Value %>"></TD>

</TR>





To make this a TEXTAREA, change the code above to look like this:



<TR>

<TD>Current Job History:</TD>

<TD><% =oRs.Fields("JobHistory").Value %></TD>

<TD>  </TD>

<%

Session("JobHistory") = oRs("JobHistory")

%>

<TD>New Job History:</TD>

<TD><TEXTAREA NAME="JobHistory" COLS="40" ROWS="15"><%

=oRs.Fields("JobHistory").Value %></TEXTAREA></TD>

</TR>





You can change the COLS and ROWS to be the size that fits your needs.

-Peter













Leo Clayton <claytonl@z...> on 12/29/2000 12:49:08 PM



Please respond to "ASP Databases" <asp_databases@p...>



To:   "ASP Databases" <asp_databases@p...>

cc:    (bcc: Peter Foti)



Subject:  [asp_databases] TextArea Use







How do you use the TextArea attribute of the FORM tag?  Examples PLEASE.



I have an Access Table that has a memo field in it (JobHistory, which of

course has job history info in it).

I SELECT five fields from this table based upon an IDNumber field match.  I

have a FORM with an HTML table in it that displays/writes the current info

back to the screen/my browser (so they can see what's currently there,

don't ask me why) while moving the exact same info to the form field so

that the user changes only the info that they wish to update/change.  The

first four fields (which are data type = text) are displayed on the screen

and move to the form fields just  as I expected/intended.  The last field

(data type = memo) is displayed on the screen, but is not moved to the form

field.



Can someone tell me why?



What I really need/want to do is move this memo field data to the FORM  and

be able to add to what is currently there, if necessary.



Here is my code:

<%

strSQL = "SELECT * FROM EmployeeTable WHERE (IDNumber 

'"&Session("IDNumber")&"')"

Set DbObj = Server.CreateObject("ADODB.CONNECTION")

DbObj.Open "DSN=EmployeeMaster"

Set oRs = DbObj.Execute(strSQL)

%>



<FORM ACTION="UpdateEmployeeTable4.asp" METHOD="POST" >

<CENTER>



<TABLE BORDER=0>



<TR>

<TD>Current First Name:</TD>

<TD><% =oRs.Fields("FirstName").Value %></TD>

<TD>  </TD>

<TD>New First Name:</TD>

<TD><INPUT TYPE="Text" NAME="FirstName" value="<%

=oRs.Fields("FirstName").Value %>"></TD>

</TR>



<TR>

<TD>Current Last Name:</TD>

<TD><% =oRs.Fields("LastName").Value %></TD>

<TD>  </TD>

<TD>New Last Name:</TD>

<TD><INPUT TYPE="Text" NAME="LastName" value="<%

=oRs.Fields("LastName").Value %>"></TD>

</TR>



<TR>

<TD>Current Title:</TD>

<TD><% =oRs.Fields("Title").Value %></TD>

<TD>  </TD>

<%

Session("Title") = oRs("Title")

%>

<TD>New Title:</TD>

<TD><INPUT TYPE="Text" NAME="Title" value="<% =oRs.Fields("Title").Value

%>"></TD>

</TR>



<TR>

   <TD>Current Education:</TD>

   <TD><% =oRs.Fields("Education").Value %></TD>

   <TD>  </TD>

<%

Session("Education") = oRs("Education")

%>

   <TD>New Education:</TD>

   <TD>

     <INPUT TYPE="Text" NAME="Education" value="<%

=oRs.Fields("Education").Value %>">

   </TD>

</TR>



<TR>

<TD>Current Job History:</TD>

<TD><% =oRs.Fields("JobHistory").Value %></TD>

<TD>  </TD>

<%

Session("JobHistory") = oRs("JobHistory")

%>

<TD>New Job History:</TD>

<TD><INPUT TYPE="Text" NAME="JobHistory" value="<%

=oRs.Fields("JobHistory").Value %>"></TD>

</TR>





<TR>

<TD></TD>

<TD ALIGN=CENTER COLSPAN=2><BR>

<INPUT TYPE="Submit" VALUE="Submit Update">  

<INPUT TYPE="RESET"></TD>

</TR>

</TABLE>

</CENTER>

</FORM>
















Content-Type: text/plain; charset="us-ascii"

Content-description: footer



--- 

FREE SOFTWARE DEVELOPMENT CODE, CONTENT, AND

INSIGHTS IN YOUR INBOX!

Get the latest and best C++, Visual C++, Java, Visual Basic, and XML tips, tools, and 

developments from the experts.  Sign up for one or more of EarthWeb?s

FREE IT newsletters at http://www.earthweb.com today!  

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com





--0__=pQFMLxZiS7jyDUBvoxU1HZRwhw1exqAC0Sgqbyrez2VwiTKejPyDXR8d--

Message #3 by Andy Johnson <lysaer@d...> on Fri, 29 Dec 2000 12:41:50 -0600
--------------E0D68BCF8E6C1E4A79D8ADC2

Content-Transfer-Encoding: 7bit

Content-Type: text/plain; charset=us-ascii



In your form tag, text area is used as:



  <textarea name="textarea" cols="50" rows="3"></textarea>



If you want to insert data from your database into it, put the rs field

inside the two tags, such as:



 <textarea name="textarea" cols="50" rows="3"> <%= rs("textarea") %>

</textarea>



Leo Clayton wrote:



> How do you use the TextArea attribute of the FORM tag?  Examples

> PLEASE.

>

> I have an Access Table that has a memo field in it (JobHistory, which

> of course has job history info in it).

> I SELECT five fields from this table based upon an IDNumber field

> match.  I have a FORM with an HTML table in it that displays/writes

> the current info back to the screen/my browser (so they can see what's

> currently there, don't ask me why) while moving the exact same info to

> the form field so that the user changes only the info that they wish

> to update/change.  The first four fields (which are data type = text)

> are displayed on the screen and move to the form fields just  as I

> expected/intended.  The last field (data type = memo) is displayed on

> the screen, but is not moved to the form field.

>

> Can someone tell me why?

>

> What I really need/want to do is move this memo field data to the

> FORM  and be able to add to what is currently there, if necessary.

>

> Here is my code:

> <%

> strSQL = "SELECT * FROM EmployeeTable WHERE (IDNumber 

> '"&Session("IDNumber")&"')"

> Set DbObj = Server.CreateObject("ADODB.CONNECTION")

> DbObj.Open "DSN=EmployeeMaster"

> Set oRs = DbObj.Execute(strSQL)

> %>

>

> <FORM ACTION="UpdateEmployeeTable4.asp" METHOD="POST" >

> <CENTER>

>

> <TABLE BORDER=0>

>

> <TR>

> <TD>Current First Name:</TD>

> <TD><% =oRs.Fields("FirstName").Value %></TD>

> <TD>  </TD>

> <TD>New First Name:</TD>

> <TD><INPUT TYPE="Text" NAME="FirstName" value="<%

> =oRs.Fields("FirstName").Value %>"></TD>

> </TR>

>

> <TR>

> <TD>Current Last Name:</TD>

> <TD><% =oRs.Fields("LastName").Value %></TD>

> <TD>  </TD>

> <TD>New Last Name:</TD>

> <TD><INPUT TYPE="Text" NAME="LastName" value="<%

> =oRs.Fields("LastName").Value %>"></TD>

> </TR>

>

> <TR>

> <TD>Current Title:</TD>

> <TD><% =oRs.Fields("Title").Value %></TD>

> <TD>  </TD>

> <%

> Session("Title") = oRs("Title")

> %>

> <TD>New Title:</TD>

> <TD><INPUT TYPE="Text" NAME="Title" value="<%

> =oRs.Fields("Title").Value %>"></TD>

> </TR>

>

> <TR>

>   <TD>Current Education:</TD>

>   <TD><% =oRs.Fields("Education").Value %></TD>

>   <TD>  </TD>

> <%

> Session("Education") = oRs("Education")

> %>

>   <TD>New Education:</TD>

>   <TD>

>     <INPUT TYPE="Text" NAME="Education" value="<%

> =oRs.Fields("Education").Value %>">

>   </TD>

> </TR>

>

> <TR>

> <TD>Current Job History:</TD>

> <TD><% =oRs.Fields("JobHistory").Value %></TD>

> <TD>  </TD>

> <%

> Session("JobHistory") = oRs("JobHistory")

> %>

> <TD>New Job History:</TD>

> <TD><INPUT TYPE="Text" NAME="JobHistory" value="<%

> =oRs.Fields("JobHistory").Value %>"></TD>

> </TR>

>

>

> <TR>

> <TD></TD>

> <TD ALIGN=CENTER COLSPAN=2><BR>

> <INPUT TYPE="Submit" VALUE="Submit Update">  

> <INPUT TYPE="RESET"></TD>

> </TR>

> </TABLE>

> </CENTER>

> </FORM>

>

>





--- 

NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?

Visit EarthWeb for the latest in IT Management, Software Development, 

Web Development, Networking & Communications, and Hardware & Systems.  

Click on http://www.earthweb.com for FREE articles, tutorials,

and discussions from the experts.

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com





--------------E0D68BCF8E6C1E4A79D8ADC2

Content-Transfer-Encoding: 7bit

Content-Type: text/html; charset=us-ascii



<!doctype html public "-//w3c//dtd html 4.0 transitional//en">

<html>

In your form tag, text area is used as:

<p>  <textarea name="textarea" cols="50" rows="3"></textarea>

<p>If you want to insert data from your database into it, put the rs field

inside the two tags, such as:

<p> <textarea name="textarea" cols="50" rows="3"> <%= rs("textarea")

%> </textarea>

<p>Leo Clayton wrote:

<blockquote TYPE=CITE><font size=-1>How do you use the TextArea attribute

of the FORM tag?  Examples PLEASE.</font>

<p><font size=-1>I have an Access Table that has a memo field in it (JobHistory,

which of course has job history info in it).</font>

<br><font size=-1>I SELECT five fields from this table based upon an IDNumber

field match.  I have a FORM with an HTML table in it that displays/writes

the current info back to the screen/my browser (so they can see what's

currently there, don't ask me why) while moving the exact same info to

the form field so that the user changes only the info that they wish to

update/change.  The first four fields (which are data type = text)

are displayed on the screen and move to the form fields just  as I

expected/intended.  The last field (data type = memo) is displayed

on the screen, but is not moved to the form field.</font>

<p><font size=-1>Can someone tell me why?</font>

<p><font size=-1>What I really need/want to do is move this memo field

data to the FORM  and be able to add to what is currently there, if

necessary.</font>

<p><font size=-1>Here is my code:</font>

<br><font size=-1><%</font>

<br><font size=-1>strSQL = "SELECT * FROM EmployeeTable WHERE (IDNumber

= '"&Session("IDNumber")&"')"</font>

<br><font size=-1>Set DbObj = Server.CreateObject("ADODB.CONNECTION")</font>

<br><font size=-1>DbObj.Open "DSN=EmployeeMaster"</font>

<br><font size=-1>Set oRs = DbObj.Execute(strSQL)</font>

<br><font size=-1>%></font>

<p><font size=-1><FORM ACTION="UpdateEmployeeTable4.asp" METHOD="POST"

></font>

<br><font size=-1><CENTER></font>

<p><font size=-1><TABLE BORDER=0></font>

<p><font size=-1><TR></font>

<br><font size=-1><TD>Current First Name:</TD></font>

<br><font size=-1><TD><% =oRs.Fields("FirstName").Value %></TD></font>

<br><font size=-1><TD>&nbsp;&nbsp;</TD></font>

<br><font size=-1><TD>New First Name:</TD></font>

<br><font size=-1><TD><INPUT TYPE="Text" NAME="FirstName" value="<%

=oRs.Fields("FirstName").Value %>"></TD></font>

<br><font size=-1></TR></font>

<p><font size=-1><TR></font>

<br><font size=-1><TD>Current Last Name:</TD></font>

<br><font size=-1><TD><% =oRs.Fields("LastName").Value %></TD></font>

<br><font size=-1><TD>&nbsp;&nbsp;</TD></font>

<br><font size=-1><TD>New Last Name:</TD></font>

<br><font size=-1><TD><INPUT TYPE="Text" NAME="LastName" value="<%

=oRs.Fields("LastName").Value %>"></TD></font>

<br><font size=-1></TR></font>

<p><font size=-1><TR></font>

<br><font size=-1><TD>Current Title:</TD></font>

<br><font size=-1><TD><% =oRs.Fields("Title").Value %></TD></font>

<br><font size=-1><TD>&nbsp;&nbsp;</TD></font>

<br><font size=-1><%</font>

<br><font size=-1>Session("Title") = oRs("Title")</font>

<br><font size=-1>%></font>

<br><font size=-1><TD>New Title:</TD></font>

<br><font size=-1><TD><INPUT TYPE="Text" NAME="Title" value="<%

=oRs.Fields("Title").Value %>"></TD></font>

<br><font size=-1></TR></font>

<p><font size=-1><TR></font>

<br><font size=-1>  <TD>Current Education:</TD></font>

<br><font size=-1>  <TD><% =oRs.Fields("Education").Value %></TD></font>

<br><font size=-1>  <TD>&nbsp;&nbsp;</TD></font>

<br><font size=-1><%</font>

<br><font size=-1>Session("Education") = oRs("Education")</font>

<br><font size=-1>%></font>

<br><font size=-1>  <TD>New Education:</TD></font>

<br><font size=-1>  <TD></font>

<br><font size=-1>    <INPUT TYPE="Text" NAME="Education"

value="<% =oRs.Fields("Education").Value %>"></font>

<br><font size=-1>  </TD></font>

<br><font size=-1></TR></font>

<p><font size=-1><TR></font>

<br><font size=-1><TD>Current Job History:</TD></font>

<br><font size=-1><TD><% =oRs.Fields("JobHistory").Value %></TD></font>

<br><font size=-1><TD>&nbsp;&nbsp;</TD></font>

<br><font size=-1><%</font>

<br><font size=-1>Session("JobHistory") = oRs("JobHistory")</font>

<br><font size=-1>%></font>

<br><font size=-1><TD>New Job History:</TD></font>

<br><font size=-1><TD><INPUT TYPE="Text" NAME="JobHistory" value="<%

=oRs.Fields("JobHistory").Value %>"></TD></font>

<br><font size=-1></TR></font>

<br> 

<p><font size=-1><TR></font>

<br><font size=-1><TD></TD></font>

<br><font size=-1><TD ALIGN=CENTER COLSPAN=2><BR></font>

<br><font size=-1><INPUT TYPE="Submit" VALUE="Submit Update">&nbsp;&nbsp;</font>

<br><font size=-1><INPUT TYPE="RESET"></TD></font>

<br><font size=-1></TR></font>

<br><font size=-1></TABLE></font>

<br><font size=-1></CENTER></font>

<br><font size=-1></FORM></font>

<br> 

</blockquote>



--- <BR>

NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?<BR>

Visit EarthWeb for the latest in IT Management, Software Development, <BR>

Web Development, Networking & Communications, and Hardware & Systems.  <BR>

Click on http://www.earthweb.com for FREE articles, tutorials,<BR>

and discussions from the experts.<BR>

---<BR>

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')<BR>

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com<BR>



</html>





--------------E0D68BCF8E6C1E4A79D8ADC2--




  Return to Index