From: Balakrishnan R. <rb...@gm...> - 2008-03-19 23:25:25
|
Hi Ahmed, Thanks for the immediate reply. Your suggestion worked for me. IHMO, It would be nice if HU sets the focus automatically just before input field's value attribute is changed. Thank you once again. Bala On Wed, Mar 19, 2008 at 1:28 PM, Ahmed Ashour <asa...@ya...> wrote: > > > > Dear Bala, > > > > onfocus is supported, but onfocusin is not. > > You can try page.moveFocusToElement() before selecting the Option. > > HtmlSelect newCountry = (HtmlSelect) > page.getHtmlElementById("newCountry"); > page.moveFocusToElement(newCountry); > > > I guess you also have a point that focus should automatically move to the > Select on selecting its Options. > > If you need support for onfocusin, please open a bug report, so the issue is > not forgotten. > > Many thanks, > Ahmed > > > ----- Original Message ---- > From: rbkcbe <rb...@gm...> > To: htm...@li... > Sent: Wednesday, March 19, 2008 10:25:52 PM > Subject: [Htmlunit-user] HtmlSelect NOT firing onfocus event > > > Hi, > > I've a HtmlSelect with onfocus attribute > > <select onfocus="SelectOnFocus()" onfocusin="SelectOnFocusIn()" > name="newCountry" id="newCountry"> > > <option value="">Select New Country</option><option > value="Austria">Austria</option><option > value="Belgium">Belgium</option><option value="Bulgaria">Bulgaria</option> > > </select> > > When an option is selected, the SelectOnFocus function is NOT getting > called. > > Is onfocus/onfocusin supported? > > > PS the attached Html and Java code for same. > > http://www.nabble.com/file/p16149208/onfocus.html onfocus.html > http://www.nabble.com/file/p16149208/TestOnFocus.java TestOnFocus.java > > > Yes, onchange is working fine. But in the webapp I'm testing, onfocus and > onfocusin are used due to some strange bugs in IE6 > > > Thanks in advance > Bala > > ________________________________ > Looking for last minute shopping deals? Find them fast with Yahoo! Search. > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > |