View Full Version : Resizing text field with onfocus

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;

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

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