0

hi there..

can i retrieve the break tag from querystring? i have a textarea which i store in a querystring. the textarea will not show the break tag if i have break tag among the text i typed.

let me explain in greater details. i have a dropdownlist whereby onclick it will store the values from other html inputs' values (textarea, dropdownlist) into the querystring, and the html inputs' values should remain. the problem is that if i have a chunk of words in a textarea where there are paragraph breaks and when the dropdownlist onclick triggers, there are no paragraph breaks, the words are all joined together.

here are my codes:

<textarea name="txt" id="txt" rows="5" cols="100" class="text" mandatory='true' display='txt' pattern='ALPHA_NUMERIC_PLUS'><%=request.QueryString("txt")%></textarea>

function check(){
	document.form.action = "page.asp?txt="+document.form.txt.value;
	document.form.submit();
}
4
Contributors
3
Replies
4
Views
12 Years
Discussion Span
Last Post by perfectweb
0

Why use the querystring? Can't you use POST rather than GET? Also, you aren't supposed to enter HTML tags into a textarea... it should automatically "break" text according to the browser window size.

0

Agreed with tgreer. Better to use post in your form and retrive the data from texarea using request.form("txt"). Here is what I would normally do:

mytxt = request.form("txt")
' use one of the following depend how you want to display your data
mytxt = replace(mytxt, "<br>", Chr(13)) ' convert html tag into new line
mytxt = replace(mytxt, Chr(13), "<br>") ' convert new line/break into html tag

You may use \n instead of Chr(13)

.

0

when u output the php row write this

<?php
$query = "your select";
$result = mysql_query($query);
while($row = mysql_fetch_asssoc)
{
   nl2br($row['yourrow']);
}
?>

this is a php function use this hope it helps u

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.