Click here to Skip to main content
16,004,761 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have textarea where user copy and paste url while paste user should get msg that space is not allowed and length must be 100 chars long. how to do that?? plz help
Posted

1 solution

you have few tasks in your main requirement, like how to detect copy past in textarea, check for spaces and length, show alert etc..
try to do one by one, if you google for those small tasks you will find many solutions and sample code in internet. for example
javascript : Detect pasted text with ctrl+v or right click -> paste[^]
JQuery: Capture text pasted into a textarea with JQuery[^]
check spaces in string using javascript : JavaScript: Check if a string has white space[^]
check length of string in javascript?[^]

Now you can try to implement your requirement with help of above resource. if you still facing problems come again and ask question with the details of what you tried and where you stuck.
Good luck! :-)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900