...

View Full Version : Onmouseover change text width?



ageisalie
11-08-2006, 12:27 PM
Is it possible, to change the width of a textbox on the mouseover control? For example, if the default size of the textbox is 104px, is it possible to change the width to say 184 onmouseover? If so, what is the code? Thanks you.

ess
11-08-2006, 05:31 PM
Yes it is possible.

here is an example.

<input type="text" onmouseover="javascript: this.style.width='180px';">

You can do the same thing for onmouseout so you can re-instantiate the width to its original value.

By the way, it might be better to defines a couple of CSS class for original width and another for for the onmouseover effect. if you do that, you can then say onmouseover="javascript: this.style.className='class_name_here'"

good luck
:thumbsup:

ageisalie
11-09-2006, 05:54 PM
Thank you so much! I'm quite new to javascript so yeah, I don't really know much. But thank you so much!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum