Author |
Topic |
|
Mr_Anderson
Starting Member
United Kingdom
20 Posts |
Posted - 02 August 2001 : 06:40:45
|
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
|
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 |
|
|
Spoon
Average Member
Ireland
507 Posts |
Posted - 02 August 2001 : 09:31:03
|
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 |
|
|
Mr_Anderson
Starting Member
United Kingdom
20 Posts |
Posted - 02 August 2001 : 14:54:52
|
thanks for the quick replies guys, much appreciated
i can now sleep at night
______________________
www.multiplayercentral.co.uk |
|
|
mafifi
Junior Member
USA
308 Posts |
|
sogoth
New Member
United Kingdom
73 Posts |
Posted - 22 August 2001 : 11:23:09
|
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! |
|
|
Craig from Alberta
Starting Member
Canada
7 Posts |
Posted - 29 August 2001 : 16:30:24
|
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.
|
|
|
|
Topic |
|