954,591 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

can i retrieve the break tag from querystring?

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();
}
ohgosh
Light Poster
41 posts since Jul 2005
Reputation Points: 10
Solved Threads: 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.

tgreer
Made Her Cry
Team Colleague
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
 

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, "", Chr(13)) ' convert html tag into new line
mytxt = replace(mytxt, Chr(13), "") ' convert new line/break into html tag


You may use \n instead of Chr(13)

.

zippee
Posting Whiz in Training
294 posts since Jan 2005
Reputation Points: 10
Solved Threads: 7
 

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

perfectweb
Newbie Poster
14 posts since Feb 2011
Reputation Points: 10
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You