RSS Forums RSS
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 2953 | Replies: 2 | Thread Tools  Display Modes
Reply
Join Date: Jul 2005
Posts: 41
Reputation: ohgosh is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
ohgosh's Avatar
ohgosh ohgosh is offline Offline
Light Poster

can i retrieve the break tag from querystring?

  #1  
Sep 8th, 2005
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();
}
cheers,
ohgosh
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Posts: 1,592
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 8
Solved Threads: 35
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: can i retrieve the break tag from querystring?

  #2  
Sep 9th, 2005
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.
Reply With Quote  
Join Date: Jan 2005
Location: Sheffield, UK
Posts: 294
Reputation: zippee is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 6
zippee's Avatar
zippee zippee is offline Offline
Posting Whiz in Training

Re: can i retrieve the break tag from querystring?

  #3  
Sep 9th, 2005
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)

.
Ecommerce-Web-Store.com Building Your e-Business.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 7:23 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC