From: Steve G. <SG...@Te...> - 2005-08-12 20:50:30
|
That seems to have fixed one of the problems, but in another instance, a body.onload() calls some javascript that changes a SPAN tag display:none to display:inline, If I look at the source HTML when the page is in this state, the SPAN graphic image is actually displayed, but if I look at the source vie IE's "View Source" menu option, it shows display:none (exactly what the IntelliJ debugger is showing for the source when using htmlunits window.getEnclosedPage), BUT when using a source viewer that shows the body via the outerHTML, the span is set to display:inline - which is what IE is showing - I've tried to use the jsxGet_outerHTML method, but I can't figure out how to get my HtmlPage case into the HTMLElement that this method requires - any suggestions? BTW - the outerHTML viewer is from www.thundermain.com/fullsource.html - pretty cool utility... Sorry for being a noob. ----- Original Message ----- From: "Marc Guillemot" <mgu...@ya...> To: <htm...@li...> Sent: Friday, August 12, 2005 2:06 AM Subject: Re: [Htmlunit-user] Getting a HtmlTextInput onchange event to fire > 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 > > > > > > ------------------------------------------------------- > 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 |