Hi,
I`m writing a mod for a forum but I`m getting an error with a piece of Javascript which checks the length of text typed into a text area.
The error only happens in IE and not firefox/mozilla
This is the JS
<script type="text/javascript">
function check_length( l_max , textBox )
{
item = eval( "document.theForm." + textBox );
if( !item )
{
return false;
}
if( l_max < item.value.length )
{
alert( "{ipb.lang['l_over']}" + l_max + " {ipb.lang['l_characters']}." );
}
if( l_max == item.value.length )
{
alert( "{ipb.lang['l_equal']}" + l_max + " {ipb.lang['l_characters']}." );
}
if( l_max > item.value.length )
{
alert( "{ipb.lang['max_is']}" + l_max + " {ipb.lang['l_characters']}. {ipb.lang['youve_used']}" + item.value.length + " {ipb.lang['l_characters']}." );
}
}
</script>
Anyone see a problem with it?