Question : javascript count characters in an input textbox

this counts characters
in an input textbox

but I want to display the character count next to the textfield
in the form

because I have a large form

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  <meta name="generator" content="PSPad editor, www.pspad.com">
  <title></title>
  <script>
    function changeContent(){
        var txt = document.getElementById('testtext').value;
        document.getElementById('dest').innerHTML = txt;
    }
    function countChars(){
        var len = document.getElementById('testtext').value.length;
        document.getElementById('dest').innerHTML = len;
    }
</script>
</head>
  <body>
    <form name='test' action='test.html' method='post'>
    <input type="text" id="testtext" name="testtext" onkeyup="countChars();">
    </form>
    <table>
    <tr>
    <td id='dest'></td>
    </tr>
    </table>
  </body>
</html>

Answer : javascript count characters in an input textbox

Hi narce100,

here's what I know about your case:
1. Scrolling issues most always denote problems with the graphics card drivers, TobiasHolm is very right about that;
2. You recently dist-upgraded from Ubuntu 9.10 to 10.04; a lot of modifications and improvements especially regarding graphics drivers have been added to Ubuntu in this last version step;
3. You have an ATI graphics adapter; unfortunately, there are known issues with ATI on Linux, and these issues have not been resolved so far;
4. You recently installed new ATI drivers on your system; they obviously did not do the trick.

I suggest you download a Ubuntu 10.04 live CD and boot your system from it. Check extensively whether there are scrolling or other graphics related issues.
Here come my suggestions; I'm afraid they're somewhat radical, but they should help you get things fixed once and for all.

a) The live CD ran fine and smooth; no detectable graphics issues:
Consider a re-install from scratch. This will ensure the graphics driver problems that may arise with 10.04 and can be solved using the Ubuntu documentation are not turned into an unresolvable mess by old settings and driver remnants taken over from previous Ubuntu versions.
Reinstall from scratch and use these community guides to set up your graphics drivers properly:
https://help.ubuntu.com/community/BinaryDriverHowto
https://help.ubuntu.com/community/BinaryDriverHowto/ATI

This will help you get your system back to its present operational state:
-- backup your complete /home folder, including hidden files
-- if you run a webserver, backup the web's root folder
-- follow these instructions to save a list of all your installed packages, so you may reinstall them with just one command:
http://www.howtoforge.com/record-installed-deb-packages-in-a-text-file-ubuntu-debian

b) You ran into graphics/scrolling issues on the live CD as well:
Consider replacing the ATI adapter by an Nvidia driven one. Unless your adapter is top-notch and you want it so, gfx cards are quite cheap. Nvidia has better support for Linux. As to the installation, it may be a lot easier to get the system going with Nvidia after removing all ATI drivers altogether than it would be to sort out a mess of old and new ATI drivers.
Random Solutions  
 
programming4us programming4us