How to set the cursor in the begging of the TextArea field?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Khushbu84
    New Member
    • Jul 2008
    • 2

    How to set the cursor in the begging of the TextArea field?

    Hello,

    I am having a problem to display my text in the beginning of the Textarea. For some reason It just keeps some spaces and then starts displaying. I am trying to display answers of selected questions into TextArea field. I am doing like this:

    <tr>
    <td width="30%">Ema il Message : </td>
    <td width="70%">

    <%
    If faqchecklist <> "" Then
    set rs1=server.crea teobject("ADODB .Recordset")
    sql="select * from faq where faqid in (" & faqchecklist & ")"
    rs1.Open sql,conn,2,2
    %>
    <textarea name="emailmess age" cols="50" rows="15">
    <%
    while not rs1.eof %>
    <%=rs1.Fields(" Answer")%> ;
    <% rs1.MoveNext
    wend
    End If
    rs1.close
    set rs1=nothing
    End If%>
    </textarea>
    </td>
    </tr>

    It displays answers starting in the middle of the textarea something like

    Answer 1 is here -------
    ----------------------;

    Answer 2 is here ------
    -----------------------;

    Last Answer -----------
    ------------------.;

    SO it does automatically adds a line and goes to next line when there is more than one answer but it starts in the middle of the textarea. If I remove ';' from my code, then it displays all answer toghether like

    Answer 1. Answer 2. Last Answer.

    So I want to display my all answers in a new line staring from the begging of the text area like

    Answer 1 - ---------------------------------------
    --------------- .

    Answer 2 - ---------------------------------------
    -------------.

    Last Answer - ----------------------------------
    -------------.

    Is that possible..? If it is please tell me how should I do that.? It is really urgent.

    Thanks
    Khushbu
  • tharden3
    Contributor
    • Jul 2008
    • 916

    #2
    Uhh, I'm relatively new to HTML... so I don't quite understand what you're asking, but a really great resource that has been cited and suggested by many expert hackers/programmers is HTMLdog.com. You can probably find an answer over there.

    Comment

    • Khushbu84
      New Member
      • Jul 2008
      • 2

      #3
      Hi,

      Anyways I found my answer.

      If I use Chr(13) and Chr(10),then I can display my each answer in a new line starting at the beginning of the textarea field. I tried like

      <%
      If faqchecklist <> "" Then
      set rs1=server.crea teobject("ADODB .Recordset")
      sql="select * from faq where faqid in (" & faqchecklist & ")"
      rs1.Open sql,conn,2,2
      If NOT rs1.eof Then %>
      <textarea name="emailmess age" cols="50" rows="15"><%
      while not rs1.eof
      Response.Write( rs1.Fields("Ans wer"))
      Response.Write( Chr(13)+ Chr(10))
      Response.Write( Chr(13)+ Chr(10))
      rs1.MoveNext
      wend
      End If
      %>
      </textarea>

      So my output in textarea field is like:

      Answer 1 We are aware that there is a programming issue with the WebNote notification of missing and late work. The problem is related the the counter that keeps track of the missing and late assignment for each student.

      Answer 2 To move student grades for an assignment follow the steps below:1. Login to WebGrader. 2. From the Help menu, send a support request for activation of the teacher.

      Last Answer Superuser or Admin User accounts that you need. Be sure to specify what year is needed. 3. You will be contacted by e-mail when the accounts are active.

      Thanks

      Khushbu

      Comment

      Working...