Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Only the first row gets copied

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a text box.
Below that, there is a table with some data:-

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaa@abc.com

When I copy this and paste it to the text box,
only

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

gets copied (means the first row only). However, when I paste it
in a notepad everything gets copied.
Is there any way, I may make the whole row to be pasted in the
text box in a single copy-paste.
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only the first row gets copied because the text that you are pasting has line-breaks.
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
from what i understand it is not one row that you are copying but multiple rows of a table.
is that correct?
 
Mishra Anshu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks,
I know that only first row is getting copied due to the line breaks.
But I can't avoid the line breaks, as per the formatting expected.

So, is there any way to make it happen (If I replace the text box with atext area the multiple rows sopy-paste will work, but the again a lot of
JavaScript validations will be affected ).

Tell me if there is any way.
 
Mishra Anshu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nono,
Actually I have copied only a single row, which has multiple line (4).
Now, when I paste it in the text box only the first line of that row is
getting pasted.
 
Niki Nono
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way is the way that you have suggested
That is by using a textarea. Line breaks dont get copied into text boxes I guess. This is something new which you have pointed out.
It works fine with text area.
But whats the problem with using a textarea??
validations will be similar to a textbox.
If you have difficulties in that area do paste and maybe we can solve it.
sorry that i couldnt help you out with a better solution.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!