textarea additional option

jflash

Member
I made small form with javascript witch counting characters (and multiply count with *2) in textarea: http://jflash.pri.ee/index.php/tahed. To do it i use ReReplacer to change textarea HTML in code, this:
Code:
<textarea class="fabrikinput inputbox" name="arvuta_taehti___textarea2"
i replace with this:
Code:
<textarea class="fabrikinput inputbox" name="arvuta_taehti___textarea2" onkeyup="CheckFieldLength(arvuta_taehti___textarea2, 'charcount', 'remaining', 20);" onkeydown="CheckFieldLength(arvuta_taehti___textarea2, 'charcount', 'remaining', 20);" onmouseout="CheckFieldLength(arvuta_taehti___textarea2, 'charcount', 'remaining', 20);"
But, can you make in Fabrik textarea element (maybe in other elements to) little change (additional option) to insert some HTML for <textarea somecode="somecode"> ? In my case i put the code:
Code:
onkeyup="CheckFieldLength(arvuta_taehti___textarea2, 'charcount', 'remaining', 20);" onkeydown="CheckFieldLength(arvuta_taehti___textarea2, 'charcount', 'remaining', 20);" onmouseout="CheckFieldLength(arvuta_taehti___textarea2, 'charcount', 'remaining', 20);"
into this field and not need ReReplacer. Can you undrstand what i mean? :)
 
you want to make text area to show how much characters of free space is remained there, right? That means I write something and during this I see in real time a changing number depending of whether I write or delete? It would be a great feature, I vote for with both hands and both legs ;)
 
If I've understood correctly then we already have this option with the 'max limit' and 'show max limit' options
 
No, i need a field to add something between <textarea> tag. For example i want add
Code:
onkeyup="CheckFieldLength(arvuta_taehti___textarea2, 'charcount', 'remaining', 20);"
into textarea. In HTML it shows :
Code:
<textarea onkeyup="CheckFieldLength(arvuta_taehti___textarea2, 'charcount', 'remaining', 20);">
 
don't know what you mean? Why do you have to add the js code in the markup. Thats not needed.

Those options I stated alter the state of the element plugin js object which creates keydown events observing the text area and doing the same functionality, namely counting the number of characters in the text field and limiting how many you can enter.

-Rob
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top