Form problem - writing data back for update


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Form problem - writing data back for update

Hybrid View

  1. #1
    Terry Guest

    Form problem - writing data back for update


    I have a form with several fields where users enter data. This data is then
    stored in an access database. The user is then able to read, update and
    delete their information via asp. Three of the fields on the initial data
    entry form are <textarea>. All of these fields update to the database from
    the inital form properly. My problem is when I go to write the information
    back to an asp page for a user who wishes to update. I am not able to use
    <textarea>. In order to even get the data to show up I am having to use
    an <input> which limits the multiline functionality and makes the user scroll
    all the way right to add something to the end of the line. It does write
    everything back properly just not in the desired format.

    <td colspan=3>Remarks<br><input style="WIDTH: 558px; HEIGHT: 65px" name=Remarks
    value="<%=RS("remarks")%>"></td>

    When I do use <textarea> no data shows up at all on the update form. I have
    tried changing the data types in the database from "text" to "memo" and back
    again, but it still is not working as I would like. Does anyone have any
    ideas what may be causing this? Any help you can offer is greatly appreicated.


    Thanks,
    Terry

  2. #2
    Devin Knutson Guest

    Re: Form problem - writing data back for update

    Terry <snakbrat@yahoo.com>
    decided that these words sounded good:
    >
    > When I do use <textarea> no data shows up at all on the update form.


    Are you trying to put the data in the textarea by using the "value"
    attribute? The textarea does not support this attribute. Instead, the
    textarea control will display whatever is inside its open/close tags:

    <textarea name="test" width="250" height="75" wrap="physical">
    <%=Trim(rsData("data_field"))%>
    </textarea>

    If this isn't it, please post the code so we can try to see what's going on.

    HTH!
    -Devin Knutson



  3. #3
    Terry Guest

    Re: Form problem - writing data back for update


    Thanks Devin - that was my exactly my problem - using "value" to write from
    the databae to the <textarea>.

    "Devin Knutson" <devin@NO_SPAM_webnw.com> wrote:
    >Terry <snakbrat@yahoo.com>
    >decided that these words sounded good:
    >>
    >> When I do use <textarea> no data shows up at all on the update form.

    >
    >Are you trying to put the data in the textarea by using the "value"
    >attribute? The textarea does not support this attribute. Instead, the
    >textarea control will display whatever is inside its open/close tags:
    >
    ><textarea name="test" width="250" height="75" wrap="physical">
    > <%=Trim(rsData("data_field"))%>
    >


  4. #4
    garetjax Guest

    Re: Form problem - writing data back for update


    Instead of this:
    <td colspan=3>Remarks<br><input style="WIDTH: 558px; HEIGHT: 65px" name=Remarks
    value="<%=RS("remarks")%>"></td>

    Use this:
    <td colspan=3>Remarks<br>
    <textarea cols="100" rows="50" name="Remarks" id="Remarks"><%=RS("remarks")%></textarea></td>

    // change your rows/cols to match what you need and add style for what you
    are looking to match to the rest of your form. (Style="" is supported).



    "Terry" <snakbrat@yahoo.com> wrote:
    >
    >I have a form with several fields where users enter data. This data is

    then
    >stored in an access database. The user is then able to read, update and
    >delete their information via asp. Three of the fields on the initial data
    >entry form are <textarea>. All of these fields update to the database from
    >the inital form properly. My problem is when I go to write the information
    >back to an asp page for a user who wishes to update. I am not able to use
    ><textarea>. In order to even get the data to show up I am having to use
    >an <input> which limits the multiline functionality and makes the user scroll
    >all the way right to add something to the end of the line. It does write
    >everything back properly just not in the desired format.
    >
    ><td colspan=3>Remarks<br><input style="WIDTH: 558px; HEIGHT: 65px" name=Remarks
    >value="<%=RS("remarks")%>"></td>
    >
    >When I do use <textarea> no data shows up at all on the update form. I

    have
    >tried changing the data types in the database from "text" to "memo" and

    back
    >again, but it still is not working as I would like. Does anyone have any
    >ideas what may be causing this? Any help you can offer is greatly appreicated.
    >
    >
    >Thanks,
    >Terry



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center