Josh 37 Posted December 7, 2012 Report Share Posted December 7, 2012 Is this possible? Can anyone share how to do this if it is possible? I have a block text area to paste a list into. I would like a stat monitor to display the number of lines in the list when the list is pasted into the block text area. I know this is possible with the regular ui stat monitor, but how do I get this to work with the ui html panel? Quote Link to post Share on other sites
Twitter Dominator 125 Posted December 7, 2012 Report Share Posted December 7, 2012 most likely you would need to add to list first before a count can be established and then sent back to the ui stat monitor as a value of items in that list that got imported but it is very doable as far as i am following the path of the idea Quote Link to post Share on other sites
Josh 37 Posted December 7, 2012 Author Report Share Posted December 7, 2012 Here: http://www.youtube.com/watch?v=Ag_envcV02g&feature=share&list=UUT1mPijHzUdKbhB9Mq_gteA Thanks WillyWonka! However I know how to do that one. That's not what I'm trying to do. I wanted the stat monitor to update when I paste the lines of text into the block text, not after I run the bot. Quote Link to post Share on other sites
Josh 37 Posted December 7, 2012 Author Report Share Posted December 7, 2012 Yup That's pretty much what I had to do. Wish there was a live update option. Quote Link to post Share on other sites
LazyBotter 188 Posted October 25, 2013 Report Share Posted October 25, 2013 Hi Guys, Just been having a mess around and this is what I came up with: <!DOCTYPE html> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <style> #textarea {height:300px;width:300px;} </style> <body> <textarea id="textarea" placeholder="Paste Text Here"></textarea> <span id="Count"></span> </body> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script> <script> $(document).ready(function(){ $("#textarea").live("keyup mouseup change", function(){ var text = $(this).val(); var text = text.match(/(.*\s)/g); var Count = 1; $.each(text,function(){ Count++; }); $("#Count").text(Count); }); }); </script> </html> There are probably better ways to do it, but it works! Carl Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.