onebite2
asked on
HTML - Text area
Have an issue with posting/preview posting threads.
Users would enter data in any format in the thread and we were suppose to retrieve the data in the same way, something similar to here.. the way i'm typing.
If users adds line breaks or carriage returns then does the post, i'm able to handle that and show the same way but if user has entered continuously without a break something like below.. i'm not able to break the way text area does it.
--See alphabets along with numbers part break up meaning i'm able to show them the way user entered the data but those below numbers entered continuously i can't break that up the same way..
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
--see below how the text area breaks it up
-- i can't do the same when i post or preview
this happens because its a text area but i cant seem to do it on the page.
00000000000000000000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0001111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1112222222 2222222222 2222222222 2222222222 2222222222 2222222222 2222222222 2222222222 2222222222 2222222222 2223333333 3333333333 3333333333 3333333333 3333333333 3333333333 3333333333 3333333333 3333333333 3333333333 333
Let me know how would i do break it on page on when i post and retrieve the text back to page. Remember something users can put carriage returns or breaks at the end.. so i have this code attached for that but code doesn't work continuous data entry process.
Let me know if you have questions.
Thanks!
Users would enter data in any format in the thread and we were suppose to retrieve the data in the same way, something similar to here.. the way i'm typing.
If users adds line breaks or carriage returns then does the post, i'm able to handle that and show the same way but if user has entered continuously without a break something like below.. i'm not able to break the way text area does it.
--See alphabets along with numbers part break up meaning i'm able to show them the way user entered the data but those below numbers entered continuously i can't break that up the same way..
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
--see below how the text area breaks it up
-- i can't do the same when i post or preview
this happens because its a text area but i cant seem to do it on the page.
00000000000000000000000000
Let me know how would i do break it on page on when i post and retrieve the text back to page. Remember something users can put carriage returns or breaks at the end.. so i have this code attached for that but code doesn't work continuous data entry process.
Let me know if you have questions.
Thanks!
Function LineBreak(strDisplay)
strDisplay = Replace (strDisplay, "<br />", vbcrlf)
LineBreak = strDisplay
End Function
<!--would call this function on the display in <td tag> -->
.Write "<td class='background'><small>" & LineBreak(strPostDescription) & "</small><br />"
<!--but this doesn't work for continuous data entry.-->
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
HainKurt, It adds dash at the end. Any idea
It does break it fine but adds dashes at the end. I'm sure its not from my code.
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
--It does break it fine but adds dashes at the end. I'm sure its not from my code.
00000000000000000000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 00 - 01111111111111111111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111 - 12222222222222222222222222 2222222222 2222222222 2222222222 2222222222 2222222222 2222222222 2222222222 2222 - 23333333333333333333333333 3333333333 3333333333 3333333333 3333333333 3333333333 3333333333 3333333333 3333 - 3
Any thoughts
It does break it fine but adds dashes at the end. I'm sure its not from my code.
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
abcde 11111 abcde 22222 abcde 33333 abcde 44444 abcde 55555
--It does break it fine but adds dashes at the end. I'm sure its not from my code.
00000000000000000000000000
Any thoughts
ASKER
Looks like browser does it but not sure.. It's def. not in my code.
When user enters flowing text on text area, save and retrieve the data shows soft hyphen or "-" at the end of flowing text.
Just like this
00000000000000000000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 111111 - 23333333333333333333333333 3333333332 2222222222 22222 - 23333333333333333333333333 3333333333 3333333333 3333333333 3333333333 3333333333 3333333333 3333333333 3333 - 3
But when i post the data, there isn't any dashes or hyphens, i even looked at the database.
00000000000000000000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111113333 3333333333 3333333333 3333333333 2222222222 2222223333 3333333333 3333333333 3333333333 3333333333 3333333333 3333333333 3333333333 33
Any thoughts
When user enters flowing text on text area, save and retrieve the data shows soft hyphen or "-" at the end of flowing text.
Just like this
00000000000000000000000000
But when i post the data, there isn't any dashes or hyphens, i even looked at the database.
00000000000000000000000000
Any thoughts
use this
<textarea style="scroll:auto;width:6 00px;borde r:1px solid gray;" rows=7 readonly>
00000000000000000000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0001111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1112222222 2222222222 2222222222 2222222222 2222222222 2222222222 2222222222 2222222222 2222222222 2222222222 2223333333 3333333333 3333333333 3333333333 3333333333 3333333333 3333333333 3333333333 3333333333 3333333333 333
</textarea>
if you need add more style to make it like a div :)
<textarea style="scroll:auto;width:6
00000000000000000000000000
</textarea>
if you need add more style to make it like a div :)
ASKER
I would give it try but i don't think it has to do anything with text area.
After the post the message, we display the message on screen on browser i mean.
Message is been displayed on browser page.
That's the i said browser doing this maybe.
After the post the message, we display the message on screen on browser i mean.
Message is been displayed on browser page.
That's the i said browser doing this maybe.
whats your latest code that gives - ? also did you check the source of the page on browser? right click, view source... what do you see there, copy and paste here...
ASKER
It still shows hyphen at the end of the line.
Again looks like hyphens are being forced by browser to break continuous flowing text .
Not sure why this is happening and how to prevent hyphens at the end.
Again looks like hyphens are being forced by browser to break continuous flowing text .
Not sure why this is happening and how to prevent hyphens at the end.
please post the rendered html, so we can see on our browsers...
ASKER
ASKER
Let me know if you need anything
ASKER
if this is the case, some code is adding those -
nothing to do with browsers... what is your code (that produces this, not the first post, the one you are using right now) to create this? I mean this part
<td class='background'><small> ....</smal l><br /></td>
nothing to do with browsers... what is your code (that produces this, not the first post, the one you are using right now) to create this? I mean this part
<td class='background'><small>
in your very first post, you said you are using this:
.Write "<td class='background'><small> " & LineBreak(strPostDescripti on) & "</small><br />"
this does not produce the html you posted if you already checked the db and there is no - inside...
The function is not responsible for this... then how do you get data from your db and put into strPostDescription? you never mentioned this and the problem is there I guess... post the code for getting data from db, and storing it into strPostDescription and all steps if you do with strPostDescription...
.Write "<td class='background'><small>
this does not produce the html you posted if you already checked the db and there is no - inside...
The function is not responsible for this... then how do you get data from your db and put into strPostDescription? you never mentioned this and the problem is there I guess... post the code for getting data from db, and storing it into strPostDescription and all steps if you do with strPostDescription...
ASKER
There are no hyphens or dashes if i use this
.Write "<td class='background'><small> " & strPostDescription & "MR" & "</small><br />"
but when i use the function and do below, i find hyphens or dashes
.Write "<td class='background'><small> " & LineBreak(strPostDescripti on) & "</small><br />"
Here is the function
Function LineBreak(strDisplay)
strDisplay = Replace (strDisplay, vbcrlf, "<br />")
LineBreak = strDisplay
End Function
.Write "<td class='background'><small>
but when i use the function and do below, i find hyphens or dashes
.Write "<td class='background'><small>
Here is the function
Function LineBreak(strDisplay)
strDisplay = Replace (strDisplay, vbcrlf, "<br />")
LineBreak = strDisplay
End Function
ASKER
There are no hyphens or dashes if i use this
.Write "<td class='background'><small> " & strPostDescription & "</small><br />"
but when i use the function and do below, i find hyphens or dashes
.Write "<td class='background'><small> " & LineBreak(strPostDescripti on) & "</small><br />"
Here is the function
Function LineBreak(strDisplay)
strDisplay = Replace (strDisplay, vbcrlf, "<br />")
LineBreak = strDisplay
End Function
.Write "<td class='background'><small>
but when i use the function and do below, i find hyphens or dashes
.Write "<td class='background'><small>
Here is the function
Function LineBreak(strDisplay)
strDisplay = Replace (strDisplay, vbcrlf, "<br />")
LineBreak = strDisplay
End Function
ASKER
Found the issue.
<textarea cols="20" rows="5" wrap="hard">