Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 ASP, textareas and databases....
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mr_Anderson
Starting Member

United Kingdom
20 Posts

Posted - 02 August 2001 :  06:40:45  Show Profile  Visit Mr_Anderson's Homepage  Send Mr_Anderson an ICQ Message
I notice that these forums are coded so that when you press enter in the message box to post a new topic or edit a post, a new paragraph is created is created. The thing is, how is this new paragraph, enter key character (carriage return??) turned into a <p>text</p> html code?

the reason I ask is because i have a similar situation, but although the paragraphs are stored in the database, they are not converted to actual <p> tags so the formattting does not remain visible.

Its a little confusing but i hope you guys can help me out, thanks


______________________

www.multiplayercentral.co.uk

davemaxwell
Access 2000 Support Moderator

USA
3020 Posts

Posted - 02 August 2001 :  07:23:29  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message
You're probably looking for this:

fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
fString = Replace(fString, CHR(10), "<BR>")


Dave Maxwell
--------------
Proud to be a "World Class" Knucklehead
Go to Top of Page

Spoon
Average Member

Ireland
507 Posts

Posted - 02 August 2001 :  09:31:03  Show Profile  Visit Spoon's Homepage  Send Spoon an ICQ Message
Chr(10) is just the line feed(the enter key really..)



Regards - Spoon

Begineer? Need help installing the forums? - www.aslickpage.com/snitz_help.html

www.ASlickPage.com - Private Messaging
Go to Top of Page

Mr_Anderson
Starting Member

United Kingdom
20 Posts

Posted - 02 August 2001 :  14:54:52  Show Profile  Visit Mr_Anderson's Homepage  Send Mr_Anderson an ICQ Message
thanks for the quick replies guys, much appreciated

i can now sleep at night


______________________

www.multiplayercentral.co.uk
Go to Top of Page

mafifi
Junior Member

USA
308 Posts

Posted - 02 August 2001 :  19:02:05  Show Profile  Send mafifi an ICQ Message
Whoever put this together www.aslickpage.com/snitz_help.html
Nice work

Thanks,

Mo
Go to Top of Page

sogoth
New Member

United Kingdom
73 Posts

Posted - 22 August 2001 :  11:23:09  Show Profile  Visit sogoth's Homepage
Silly question really, but how do you place the content of a textbox into the fString (or whatever you call it) variable so that you can set the formatting before it is submitted to the database?

I can't see where it's done in the forum code at all.

Also when passing text off to Access do you need to replace \ with '\ as you do in MySQL?

thanks



Paul -
Complete Muppet, Borderline Feeble!
Go to Top of Page

Craig from Alberta
Starting Member

Canada
7 Posts

Posted - 29 August 2001 :  16:30:24  Show Profile  Visit Craig from Alberta's Homepage
Depends on how you are getting the information from the text box.

Using the POST method it is:
fString=Request.Form("nameoftextbox")

Using the GET method it is:
fString=Request.QueryString("nameoftextbox")

or even simpler for both you can use:
fString=Request("nameoftextbox")

or if you are getting the information from a Session variable it might be:
fString=Session("nameofsessionvariable")

or from a cookie might be:
fString=Request.Cookies("cookiethatstorestextboxinformation")

and no is the answer to your other question.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07