Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Pasting multiple lines into a single line text box

Reply
Thread Tools

Pasting multiple lines into a single line text box

 
 
Adam Plocher
Guest
Posts: n/a
 
      06-13-2007
Hello, I have an <input type="text" /> textbox that when the Enter key
is pressed, it's text gets processed by a javascript and it clears the
contents of the textbox. I was wondering if it's possible to have it
handle pasting multiple-lines of text into it, so that on every line
break it get's processed by javascript then clears the text field and
handles the next line.

I know IE has onpaste and onbeforepaste events, but I still can't see
how to do what I want with those. Any suggestions? I might be able
to use a textarea and have it mimic the behavior of a single line text
box...

Thanks
-Adam

 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      06-13-2007
Adam Plocher wrote:
> Hello, I have an <input type="text" /> textbox that when the Enter key
> is pressed, it's text gets processed by a javascript and it clears the
> contents of the textbox. I was wondering if it's possible to have it
> handle pasting multiple-lines of text into it, so that on every line
> break it get's processed by javascript then clears the text field and
> handles the next line.
>
> I know IE has onpaste and onbeforepaste events, but I still can't see
> how to do what I want with those. Any suggestions? I might be able
> to use a textarea and have it mimic the behavior of a single line text
> box...


?? Use the right tools for the application, especially where there is
already a tool for your needs.

textbox => single line of input
textarea => multiple lines of input

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
resolve single line with multiple items into mutliple lines, single items ela Perl Misc 12 04-06-2009 06:47 PM
Pasting text into Outlook Express dwm Computer Support 24 09-06-2007 05:38 PM
Preserve blank lines when add multiple lines of text to a cell Cah Sableng Javascript 0 04-23-2007 04:46 AM
Text files read multiple files into single file, and then recreate the multiple files googlinggoogler@hotmail.com Python 4 02-13-2005 05:44 PM
How to concatening/pasting multiple web pages into one browser window with FRAMESET ??? Wladimir Borsov HTML 0 08-28-2003 08:59 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57