Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Why this INITIAL line is adding?

Avatar

Level 8

Hello

For some reason, am getting the user entered text with a INITIAL line as a first line, struggling to figure it out, so, then , i thought, the simple solution would be removing/deleting that INITIAL line by JavaScript, my case is as below,

i hv a multiple lines text field/looks like a box, say, saved_comments_box

i hv another multiple lines text field/looks like a box, say, current_comments_box

user enters his/her comments/text in the current_comments_box, my JavaScript is moving this comments to saved_comments_box

fine, but from some how an additional INITIAL line is adding while moving, for example, say,

user enterd the below lines current_comments_box,,

1st line) my comment 1

2nd line) my comment 2

my JavaScript is moving thse 2 lines into saved_comments_box as below

1st line) -------------------------    --> here an INITIAL line / line with all spaces is adding, not sure why its adding

2nd line) my comment 1

3rd line) my comment 2

so, pls. let me know How can i remove/delete/get rid off the very first line of this in JavaScript?

Thank you

0 Replies