From: Marc G. <mgu...@ya...> - 2005-08-12 08:02:53
|
if you're sure that the event is not fired, please try to minimize the problem and open a bug issue for this. If the onchange is fired and it triggers the load of a new page, then the newly loaded page will NEVER be form.getPage()! Look at the page contained in the window. Marc. Steve Gray wrote: > Perhaps a little more information would be helpful - the onchange event > fires javascript to create values in other HtmlTextInput objects on the > page, and actually causes a page refresh - the page coming back from the > form.getPage() call does not have these new non-blank values. > > ----- Original Message ----- > From: "Steve Gray" <SG...@Te...> > To: <htm...@li...> > Sent: Thursday, August 11, 2005 11:25 AM > Subject: Re: [Htmlunit-user] Getting a HtmlTextInput onchange event to fire > > > >>It's on by default, and we are not explicitly turning it off, so, yes, >>javascript is enabled. Here's the code: >> >>private static HtmlPage setInputText(HtmlForm form, String name, String >>value) throws Exception { >> >> HtmlTextInput textField = (HtmlTextInput) > > form.getInputByName(name); > >> if (textField != null) { >> textField.setValueAttribute(value); >> } >> return form.getPage(); >>} >>----- Original Message ----- >>From: "Marc Guillemot" <mgu...@ya...> >>To: <htm...@li...> >>Sent: Thursday, August 11, 2005 11:18 AM >>Subject: Re: [Htmlunit-user] Getting a HtmlTextInput onchange event to > > fire > >> >>>The onchange handler should be fired. May you have deactivated > > javascript? > >>>Marc. >>> >>>Steve Gray wrote: >>> >>>>I'm trying to set the value attribute of this input type=text object, >> >>but >> >>>>nothing I do seems to get the onchange event to fire - does htmlunit >> >>have an >> >>>>equivalent method to the IE DOM method fireEvent? See: >>>> >> > http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/fireevent.asp > >>>>Here's the tag: >>>><input type="text" name="doseWeightRate" maxlength="10" size="10" >> >>value="" >> >>>>onchange="doseWeightRateEntered()" class="rightAlign"> >>>> >>>>I use setValueAttribute, and the value changes, but I can't get the >> >>onchange >> >>>>event to fire. >>>> >>>>Thanks- >>>>Steve >>>> >>>> >>>> >>>>------------------------------------------------------- >>>>SF.Net email is Sponsored by the Better Software Conference & EXPO >>>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle >> >>Practices >> >>>>Agile & Plan-Driven Development * Managing Projects & Teams * Testing > > & > >>QA >> >>>>Security * Process Improvement & Measurement * >> >>http://www.sqe.com/bsce5sf >> >>>>_______________________________________________ >>>>Htmlunit-user mailing list >>>>Htm...@li... >>>>https://lists.sourceforge.net/lists/listinfo/htmlunit-user >>>> >>> >>> >>> >>>------------------------------------------------------- >>>SF.Net email is Sponsored by the Better Software Conference & EXPO >>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle >> >>Practices >> >>>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & > > QA > >>>Security * Process Improvement & Measurement * > > http://www.sqe.com/bsce5sf > >>>_______________________________________________ >>>Htmlunit-user mailing list >>>Htm...@li... >>>https://lists.sourceforge.net/lists/listinfo/htmlunit-user >> > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |