View Full Version : Dynamically Writing Data Without Textboxes

06-02-2006, 09:28 PM
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.


06-02-2006, 09:40 PM
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';

06-05-2006, 07:39 PM
Excellent. Thanks.