Author |
Topic |
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 13 October 2003 : 10:59:02
|
Hi i would like to have some pre-inserted text (almost template style)in the text box when a user either replys to or creates a new topic i have managed to edit the post.asp and insert text into the text area for everyone but i would like to seperate the text with carriage returns so that each pre-inserted heading starts on new line, so i guess what i'm asking is how to insert carriage returns in the text box? thanks as always in advance for any help |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 13 October 2003 : 11:23:17
|
There was something like this for v3.3.x which would allow members to add their own custom headers and footers to all their messages. For example, all my posts here are in black so I could set my profile so that [black] was added to the beginning of all my posts and [/black] to then end, which would save a bit iof typing. If I remember correctly, Image was the author so it might be worth having a look at his site.
To answer your question though, use vbCrLf to insert line breaks in the textarea. E.G.:
Response.Write "<textarea>header" & vbCrLf & vbCrLf & "footer"</textarea>"
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 13 October 2003 : 11:40:43
|
sorry i didn't understand your example (bit of thicky sorry) can you do it using this code i'm trying to put a line break in between situation: class/time/location: action so it looks like this situation: class/time/location: action:
<textarea cols=""" & intCols & """ name=""Message"" rows=""" & intRows & """ wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & Trim(CleanCode(TxtMsg)) & "Situation: Class/Time/Location: Action:</textarea> |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 13 October 2003 : 12:08:00
|
Uraken, check Steve D.'s Event Add On.: http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=41216&SearchTerms=Steve,D,Event,Add,On It shows how to insert an editable field which gets added to the messagetext in post_info.asp. I did it in our intranet site, and it works as a charm. The enters are added by merging the messagetext : from post_info.asp:
if Len(Request.Form("handover_contractname")) > 1 then
HandoverInfo = HandoverInfo & "Contract : " & Request.Form("handover_contractname") & vbNewLine
end if The vbNewline creates a new line.
Good luck! |
portfolio - linkshrinker - oxle - twitter |
Edited by - MarcelG on 13 October 2003 12:11:26 |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 13 October 2003 : 12:43:01
|
Add the code in red below:<textarea cols=""" & intCols & """ name=""Message"" rows=""" & intRows & """ wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & Trim(CleanCode(TxtMsg)) & "Situation:" & vbCrLf & "Class/Time/Location:" & vbCrLf & "Action:</textarea> |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 14 October 2003 : 03:33:57
|
Thanks to the both of you it now works fine and dandy.your help is very much apreciated |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 14 October 2003 : 04:57:51
|
You're welcome, Uraken.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 15 October 2003 : 09:32:25
|
marcelgoertz i read with interest the article which you very kindly pointed me to i got the general idea of what was being said although in all honesty i was a bit lost as it talked of calender mods being required is there any other way that you know of in which i can add editable field like drop down lists to the message area or how do i include a new field on the post.asp so that it would appear n the message when posted? I Know its a big ask so i thank you in advance. |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 16 October 2003 : 02:59:12
|
quote: Originally posted by uraken
marcelgoertz i read with interest the article which you very kindly pointed me to i got the general idea of what was being said although in all honesty i was a bit lost as it talked of calender mods being required is there any other way that you know of in which i can add editable field like drop down lists to the message area or how do i include a new field on the post.asp so that it would appear n the message when posted? I Know its a big ask so i thank you in advance.
Uraken, just send me an e-mail, and I will send you example files. |
portfolio - linkshrinker - oxle - twitter |
|
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 16 October 2003 : 17:30:27
|
marcelgoertz, did you get my mail? |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 20 October 2003 : 04:35:22
|
my email to you bounced back, however i have managed with help to get it working now so thanks alot mate. |
|
|
|
Topic |
|