...

View Full Version : Resizing text field with onfocus



soneen
06-09-2010, 12:00 AM
I am trying to get a text field to increase in size (one time to a predetermined size) when user clicks in the text field. Here is the code that for some reason isn't working for me.



<script type='text/javascript'>
function resizeIt()
{
document.getElementById('comment').style.height = 50px;
};
</script>

<input type='text' id='comment' class='urlTextArea' name='url' value=''
size='75' onfocus='resizeIt()'>

soneen
06-09-2010, 02:31 AM
FIXED: I was missing quotes around '50px'.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum