/    Sign up×
Community /Pin to ProfileBookmark

TextArea Input

Hi,

I encountered a funny case where I tried to assign a value into the <textarea>. It does not start at the position 0, it has few indentations of TABs where I cannot figure out where that come from.

Anyone has any idea?

It hows like this (with 2 TABs):-
+————————–+
|(TA?(TA? User name

|

+————————–+

What I really like is to have this:-
+————————–+
|User name

|

+————————–+

Regards,
Jack Kee

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@FangMay 04.2005 — Need more information; the html and how the text is being inserted.
Copy linkTweet thisAlerts:
@jacknbeyauthorMay 04.2005 — Actually quite a simple one using ASP.

<textarea rows=24 cols=35 name=userList>

<%

sql="select distinct Username from Users where Migration='"&varValue&"'"

rs.open sql, conn, 0, 1

if rs.eof then

else

rs.movefirst

counter=1

do while not rs.eof

varUsername = trim(rs("Username"))

if varUsername <> "" then

response.write chr(13) & chr(10) & varUsername end if

counter=counter + 1

rs.movenext

loop

rs.close

end if

%>

</textarea>

It should extract the names from the SQL database and write to the textarea line by line. The problem is it will first write 2 TABs on the first line, and one TAB on the last line. I have no idea why this happen...

Thanks.
×

Success!

Help @jacknbey spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...