limit character input (by count) with : in textarea name
I have a nice js character limit script I have used for a long time with no problem.
I have tried quotes, escaped quotes and characters and various incantations but can't seem to convince it to work.
Any suggested fix on this one - or pointers to another similar script that will cope with this naming system.
Actually, it balks even at the leading digit in the name.
If you won't follow normal naming rules for form fields you have to
(1) Ensure that you put "..." around the entire name.
But you really never needed to refer to THAT <textarea> by name in that JS code, in the first place.
Just do this:
Notice that just this alone specifies the current field! nothing else needed.
Stop using PHP to output complex HTML. Do as I show there: Output the HTML, yes, and then only use the minimal PHP needed to output the contents.
Oh...and upper case letters in event handler names is obsolete. onkeyup and onkeydown are correct.
Yes - and yes again.
The naming system fits with a generic form processor with lots of options - fed via the name.
And - this,this.form.
part of (this) element - obvious now you point it out.
>> Stop using PHP to output complex HTML
Yes, I do tend to just set up <? and type away.
Thanks so much.
You have helped me before -
|All times are GMT +1. The time now is 09:53 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.