Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Web form text area

Web form text area

Scheduled Pinned Locked Moved ASP.NET
questioncsharpjavascriptsysadminhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rognog
    wrote on last edited by
    #1

    Hi, I'm trying to code a web based front end to a chatbot. I have something working that looks vaguely like MSN. I'm using a text area to display the chat, appending to it server side. How do I get the text area to always scroll to the end as it has no .select() function as in c#? Some javascript client side on page load to do this? Is there a text control I could use that supports multiple text colours? cheers for any help, Rob

    A 1 Reply Last reply
    0
    • R rognog

      Hi, I'm trying to code a web based front end to a chatbot. I have something working that looks vaguely like MSN. I'm using a text area to display the chat, appending to it server side. How do I get the text area to always scroll to the end as it has no .select() function as in c#? Some javascript client side on page load to do this? Is there a text control I could use that supports multiple text colours? cheers for any help, Rob

      A Offline
      A Offline
      Andrew Quinn AUS
      wrote on last edited by
      #2

      Hi Rob, You can have some client-side script that does the following:

      var el = document.getElementById("TextBox1");
      if (el)
      {
      	el.focus();
      	el.innerText += "";
      }
      

      For your textarea this should place the caret at the end of the string in the control. You could run this in your onload event to automatically place it there everytime the page is (re)displayed. Hope this helps, Andy

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups