Location: PHPKode > projects > Chirp: The Microblog > chirp.v.1.1/themes/default/main_txt_box.theme.html
<SCRIPT Language="JavaScript">

<!--

function textCounter(field,cntfield,maxlimit) {

	if (field.value.length > maxlimit) // if too long...trim it!

		field.value = field.value.substring(0, maxlimit);

		// otherwise, update 'characters left' counter

	else

		cntfield.value = maxlimit - field.value.length;

	}

window.onload = function() {textCounter(document.chirpForm.message1,document.chirpForm.remLen1,151);

}

// --> 

</script>



<div class="txtbox">

	<form name="chirpForm" method="post">

		<span>What's happening?</span>

		<TEXTAREA noscroll cols="55" rows="3" name="message1" onKeyDown="textCounter(document.chirpForm.message1,document.chirpForm.remLen1,151)"

onKeyUp="textCounter(document.chirpForm.message1,document.chirpForm.remLen1,151)"></TEXTAREA>

		<br />

		<span style="float:right"><input readonly type="text" name="remLen1" size="3" maxlength="3" value="151" id="the151"><input type="SUBMIT" value="Submit" /></span>

	</form>

</div>

Return current item: Chirp: The Microblog