Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > restrict characters in javascript prompt

Reply
Thread Tools

restrict characters in javascript prompt

 
 
vijay21@gmail.com
Guest
Posts: n/a
 
      04-06-2005
hi all,

Can we restrict the number of characters that the user can input in a
javascript prompt? my browser hangs whenever i try to input more than
2048 characters in it.

Thanks for any help

 
Reply With Quote
 
 
 
 
kaeli
Guest
Posts: n/a
 
      04-06-2005
In article <(E-Mail Removed). com>, vijay21
@gmail.com enlightened us with...
> hi all,
>
> Can we restrict the number of characters that the user can input in a
> javascript prompt? my browser hangs whenever i try to input more than
> 2048 characters in it.
>
> Thanks for any help



I'm not sure, but if people are entering that many characters, why are you
using a prompt at all?
I would think a text field or a textarea might be more useful for the users
so they can actually see what they're entering.
And I do know how to limit those.

--
--
~kaeli~
She was engaged to a boyfriend with a wooden leg but broke
it off.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

 
Reply With Quote
 
 
 
 
Grant Wagner
Guest
Posts: n/a
 
      04-07-2005
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> hi all,
>
> Can we restrict the number of characters that the user can input in a
> javascript prompt? my browser hangs whenever i try to input more than
> 2048 characters in it.


No you can't. If you want arbitrary input from the user, use a <form>
and have them submit the form to either client- (using GET, the amount
of data you could submit will most likely be 1500-2000 characters) or
server-side (using POST, the amount of data is limited only by the
server's POST buffer restrictions) code.

--
Grant Wagner <(E-Mail Removed)>
comp.lang.javascript FAQ - http://jibbering.com/faq


 
Reply With Quote
 
vijay21@gmail.com
Guest
Posts: n/a
 
      04-09-2005
Thankyou all for the help.

 
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
prompt to save on exit - disable prompt on save button Mel ASP .Net 10 02-13-2009 05:32 AM
How to open a shell prompt from an existing shell prompt gaurav kashyap Python 3 10-31-2008 04:41 AM
How to open a shell prompt from an existing shell prompt gaurav kashyap Python 2 10-30-2008 09:18 AM
restrict simpleType to word characters and spaces except digits Anil Mamede XML 2 04-06-2008 04:39 PM
regular expression to restrict number of consecutive characters Sharkie Javascript 6 10-16-2007 04:39 AM



Advertisments