Results 1 to 4 of 4
Weird clickable area Forum: CSS ForumReplies: 3
Probably wrong area Forum: Websites For SaleReplies: 0
How can I add a members area to my site? Forum: Website Scripts ForumReplies: 5
TeXt-aReA bAcKrOuNd cOdE Forum: HTML ForumReplies: 2
03-28-2002, 06:41 AM #1
Spurious tab being inseted in text area
I hope you can help I have had no joy on other forums. i am entering information into a text area in an asp page so when the page is displayed for the first time the text is already in there. the problem is that it is entering a tab before the first line, I dont know how it got there, how to get rid of it. any ideas ?
heres the code that enters the text into the text area:
<table><tr><td><textarea NAME="BODYTEXT" growable WRAP="SOFT" ROWS="26" COLS="80">
<% sheader = replace("OFEX Market Notice" & " " & sMarketNoticeNumber,chr(0),chr(8))
sPad = " "
if len(sheader) < 80 then sheader = sheader + right(spad,40 - len(sheader))
InsertedBodytext = sheader & chr(13)& chr(13)& sheadline & chr(13)& chr(13)& sname & CHR(13)& CHR(13) & sTitle & CHR(13)& CHR(13) & "OFEX plc" & CHR(13) & "No 1 Goodmans Yard" & CHR(13)& "LONDON E1 8AT" & CHR(13) & CHR(13) & "Tel: 020 7422 0800" & _
CHR(13) & "Fax: 020 7423 0889" & chr(13) & sEmailAddress1
I hope you can help
03-28-2002, 01:37 PM #2
unless I'm mistakin I don't think anybody here knows ASP. PHP yes, but I don't think ASP. I could be wrong.
03-28-2002, 02:05 PM #3
Whilst I am unfamiliar with asp, I may be able to spot something with my naivite
I do not know the format of 'replace' in asp, so this may be wrong. Also, I do not know the character codes for asp.
I do know that CHR(8) is a control code of some sort. If that control code is tab (equivalent to ctrl+i) then it mioght be the cause. Try changing it to something innocuous like 13.
If this isn't the problem, it could be that if you are using an external data source, then a control character has somehow creeped in...If one of our members helps you, please click the icon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
03-28-2002, 06:26 PM #4
In most programming applications chr$(8) is a backspace, chr$(13) is a carriage return and chr$(10) is a linefeed. There's an awful lot of carriage returns in that code.