kevind
Posts: 251
|
Posted: 02/01/2005, 6:30 PM |
|
i have a 3 select boxes on a single row of a form the width of the data for these lists causes the form to be too large to fit the screen
i'd like to accomplish through the 'onfocus' event to have the width of the control expand while it has focus and contract when it loses focus
i've tried:
onfocus="this.style.value='width: 100px' "
to begin with but it errors out or does nothing in the browser
any thoughts - I want to keep it to one line of code if possible, what would the corresponding 'lostfocus' event be for this desired effect?
thanks
Kevin
_________________
thanks
Kevin
======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
|
|
|
peterr
Posts: 5971
|
Posted: 02/01/2005, 8:09 PM |
|
Based on JavaScript/DHTML reference at http://msdn.microsoft.com/library/default.asp?url=/work.../input_text.asp , this should work:
onfocusin="this.width=300" onfocusout="this.width=100"
(please note that Java and JavaScript aren't related and probably the General forum would be better for this topic)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
peterr
Posts: 5971
|
Posted: 02/01/2005, 8:28 PM |
|
Although I just realized that onfocusin and onfocusout may be IE-specific. Thus better events would be onfocus and onblur: http://www.porjes.com/idocs/forms/_INPUT_onFocus.html
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
kevind
Posts: 251
|
Posted: 02/01/2005, 8:35 PM |
|
thanks,
will continue searching for a solution and post one here if found
kevin
_________________
thanks
Kevin
======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
|
|
|
peterr
Posts: 5971
|
Posted: 02/01/2005, 9:45 PM |
|
Is there any problem with the above solution? It worked well when I tested it.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|