[prev in list] [next in list] [prev in thread] [next in thread] 

List:       htmlunit-user
Subject:    Re: [Htmlunit-user] Autocompletion input
From:       Jean-Eric Cuendet <jec () jesc ! ch>
Date:       2011-09-12 21:48:55
Message-ID: CALe3PmBctDT0W-T8b0TBedPFJaUiHXop_6GO02vs2bqqmwVtHA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks a lot, it works!
Regards.

2011/9/11 Tomasz Kalkosiński <tomasz2k@poczta.onet.pl>

> Hi
>
> HtmlInput method setValueAttribute calls only "onChange" javascript
> event on HtmlInput. It looks like this if you look at sources:
>
> final ScriptResult scriptResult = htmlElement.fireEvent(Event.TYPE_CHANGE);
>
> Your AJAX autocompletion field may work on other events like onKeyUp,
> onKeyDown, onKeyPress that occur during typing in real browser. To
> achieve this use type method: HtmlInput#type(String text) or
> HtmlInput#type(char c)  - Simulates typing the specified text while
> this element has focus.
>
> Greetings,
> Tomasz Kalkosiński
>
> 2011/9/11 Jean-Eric Cuendet <jec@jesc.ch>:
> >
> >>
> >> Usually, you have to wait long enough.
> >> Please read http://htmlunit.sourceforge.net/faq.html#AJAXDoesNotWork
> >
> > Thanks.
> > I already use the NicelySync listener, but when I call
> > input.setValueAttribute("text to search"), nothing happens on the server
> > side, so the ajax call is never done...
> >
> > Is it the right way?
> > On the "real" browser, as soon as I type a letter, the server is called
> and
> > the result list is updated.
> > Thanks for help
> > -jec
> >
> >
> >
> ------------------------------------------------------------------------------
> > Using storage to extend the benefits of virtualization and iSCSI
> > Virtualization increases hardware utilization and delivers a new level of
> > agility. Learn what those decisions are and how to modernize your storage
> > and backup environments for virtualization.
> > http://www.accelacomm.com/jaw/sfnl/114/51434361/
> > _______________________________________________
> > Htmlunit-user mailing list
> > Htmlunit-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/htmlunit-user
> >
> >
>
>
> ------------------------------------------------------------------------------
> Using storage to extend the benefits of virtualization and iSCSI
> Virtualization increases hardware utilization and delivers a new level of
> agility. Learn what those decisions are and how to modernize your storage
> and backup environments for virtualization.
> http://www.accelacomm.com/jaw/sfnl/114/51434361/
> _______________________________________________
> Htmlunit-user mailing list
> Htmlunit-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/htmlunit-user
>



-- 
Jean-Eric Cuendet
Le Pré des Buis 1
CH - 1315 La Sarraz

Blog: http://jesc.ch
<http://jesc.ch>LinkedIn: http://www.linkedin.com/profile/view?id=1456133
 <http://jesc.ch>FB: http://www.facebook.com/profile.php?id=100002135244701
Mobile: +41 76 222 3343
Tel: +41 21 800 3343

[Attachment #5 (text/html)]

Thanks a lot, it works!<div>Regards.<br><br><div class="gmail_quote">2011/9/11 Tomasz \
Kalkosiñski <span dir="ltr">&lt;<a \
href="mailto:tomasz2k@poczta.onet.pl">tomasz2k@poczta.onet.pl</a>&gt;</span><br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex;">

Hi<br>
<br>
HtmlInput method setValueAttribute calls only &quot;onChange&quot; javascript<br>
event on HtmlInput. It looks like this if you look at sources:<br>
<br>
final ScriptResult scriptResult = htmlElement.fireEvent(Event.TYPE_CHANGE);<br>
<br>
Your AJAX autocompletion field may work on other events like onKeyUp,<br>
onKeyDown, onKeyPress that occur during typing in real browser. To<br>
achieve this use type method: HtmlInput#type(String text) or<br>
HtmlInput#type(char c)  - Simulates typing the specified text while<br>
this element has focus.<br>
<br>
Greetings,<br>
Tomasz Kalkosiñski<br>
<br>
2011/9/11 Jean-Eric Cuendet &lt;<a href="mailto:jec@jesc.ch">jec@jesc.ch</a>&gt;:<br>
<div><div></div><div class="h5">&gt;<br>
&gt;&gt;<br>
&gt;&gt; Usually, you have to wait long enough.<br>
&gt;&gt; Please read <a \
href="http://htmlunit.sourceforge.net/faq.html#AJAXDoesNotWork" \
target="_blank">http://htmlunit.sourceforge.net/faq.html#AJAXDoesNotWork</a><br> \
&gt;<br> &gt; Thanks.<br>
&gt; I already use the NicelySync listener, but when I call<br>
&gt; input.setValueAttribute(&quot;text to search&quot;), nothing happens on the \
server<br> &gt; side, so the ajax call is never done...<br>
&gt;<br>
&gt; Is it the right way?<br>
&gt; On the &quot;real&quot; browser, as soon as I type a letter, the server is \
called and<br> &gt; the result list is updated.<br>
&gt; Thanks for help<br>
&gt; -jec<br>
&gt;<br>
&gt;<br>
</div></div>&gt; ------------------------------------------------------------------------------<br>
 &gt; Using storage to extend the benefits of virtualization and iSCSI<br>
&gt; Virtualization increases hardware utilization and delivers a new level of<br>
&gt; agility. Learn what those decisions are and how to modernize your storage<br>
&gt; and backup environments for virtualization.<br>
&gt; <a href="http://www.accelacomm.com/jaw/sfnl/114/51434361/" \
target="_blank">http://www.accelacomm.com/jaw/sfnl/114/51434361/</a><br> <div \
class="im">&gt; _______________________________________________<br> &gt; \
Htmlunit-user mailing list<br> &gt; <a \
href="mailto:Htmlunit-user@lists.sourceforge.net">Htmlunit-user@lists.sourceforge.net</a><br>
 &gt; <a href="https://lists.sourceforge.net/lists/listinfo/htmlunit-user" \
target="_blank">https://lists.sourceforge.net/lists/listinfo/htmlunit-user</a><br> \
&gt;<br> &gt;<br>
<br>
</div>------------------------------------------------------------------------------<br>
 Using storage to extend the benefits of virtualization and iSCSI<br>
Virtualization increases hardware utilization and delivers a new level of<br>
agility. Learn what those decisions are and how to modernize your storage<br>
and backup environments for virtualization.<br>
<a href="http://www.accelacomm.com/jaw/sfnl/114/51434361/" \
target="_blank">http://www.accelacomm.com/jaw/sfnl/114/51434361/</a><br> \
<div><div></div><div class="h5">_______________________________________________<br> \
Htmlunit-user mailing list<br> <a \
href="mailto:Htmlunit-user@lists.sourceforge.net">Htmlunit-user@lists.sourceforge.net</a><br>
 <a href="https://lists.sourceforge.net/lists/listinfo/htmlunit-user" \
target="_blank">https://lists.sourceforge.net/lists/listinfo/htmlunit-user</a><br> \
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jean-Eric \
Cuendet<br>Le Pré des Buis 1<br>CH - 1315 La Sarraz<br><br>Blog: <a \
href="http://jesc.ch" target="_blank">http://jesc.ch</a><div><a href="http://jesc.ch" \
target="_blank"></a>LinkedIn: <a \
href="http://www.linkedin.com/profile/view?id=1456133" \
target="_blank">http://www.linkedin.com/profile/view?id=1456133</a><br>

<div><a href="http://jesc.ch" target="_blank"></a>FB: <a \
href="http://www.facebook.com/profile.php?id=100002135244701" \
target="_blank">http://www.facebook.com/profile.php?id=100002135244701</a><br>Mobile: \
+41 76 222 3343<br>

Tel: +41 21 800 3343<br></div></div><br>
</div>



------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/

_______________________________________________
Htmlunit-user mailing list
Htmlunit-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic