Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

populate with asp data

Status
Not open for further replies.

emissions

Technical User
Mar 17, 2002
68
0
0
GB
Help???
I'm trying to populate a textarea that is assembled using javascript, now I need to populate the textarea with information stored in a database. I have a connection and data from the database displayed on the page, just can't get it to display in the textarea ready to be edited.,..

code available upon request...
 
Well - presuming you have some sort of server-side scripting available to you, you're surely just output the variable into the textarea.

The following example is in ASP for a variable called "yourValue" - you should ask in the forum for the server-side language you're using for the syntax (no JS needed):

Code:
<textarea><%=yourValue%></textarea>

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
doesn't solve the issue, as the information has html formatting tags, and these need to be kept, but not displayed to the end user and also, displayed in the textarea with formatting...

<script language= "JavaScript" type= "text/javascript" >
//this calls displayEditor function.
displayEditor('BodyText', ' ', 415, 220);
//-->
</script>

bodytext = textarea

This then updates the information, writing the require formatting, i.e. <p>blar blar</p>, etc...

I know which part I need to alter just not sure how to phrase it in javascript....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top