Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jul 2003
    Posts
    600
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Dynamically Writing Data Without Textboxes

    Hey All,

    I've got an array currently that displays rows of data. If you click on any row, it displays secondary data in a separate area below the rows. Currently the data is populating within various textboxes.

    The problem I'm having is that the textboxes need to be readonly, because the data is just for display. However putting the data in a textbox to begin with isn't ideal, since it isn't editable to begin with (kind of gives users the wrong idea). Is there a better way I can display this secondary data? I can't use labels to constantly change values within the tags like I can textboxes, and I don't have any other ideas.

    Any suggestions would be appreciated.

    Thanks.

  • #2
    Senior Coder
    Join Date
    Jul 2005
    Location
    New York, NY
    Posts
    1,084
    Thanks
    4
    Thanked 19 Times in 19 Posts
    you can use the .innerHTML property of standard display elements like spans or divs instead of the value property of the textarea:

    document.getElementById('myDiv').innerHTML = 'New Stuff';

  • #3
    Regular Coder
    Join Date
    Jul 2003
    Posts
    600
    Thanks
    17
    Thanked 0 Times in 0 Posts
    Excellent. Thanks.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •