A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
Struts2 Dojo- how to change this form to use "onkeyup"
Joined: Jun 26, 2001
Feb 14, 2009 21:13:24
I have implemented a search function which uses a form like this:
<s:form action="search"> <s:textfield name="keyword" label="Keyword"/> <s:submit theme="ajax" targets="searchResults" notifyTopics="/search"/> </s:form>
What I want is to change it into a <s:textfield...> and uses "onkeyup" so that the search result is displayed while using types.
Of course, this is not working:
<s:textfield them="ajax" targets="searchResults" onkeyup="/search"> </s:textfield>
Form what I googled, "onkeyup" can be used with "dojo.event.connect" but I could not figure out how to use it.
Can someone shed some light on this?
Thank you so much,
Joined: Sep 29, 2008
Feb 15, 2009 07:50:01
The <s:autocomplete.../> tag may be what you're looking for.
I agree. Here's the link:
subject: Struts2 Dojo- how to change this form to use "onkeyup"
Direct Action Method Mapping in Struts 2
Struts 2: Loading 2 div tags from single action with different results
pass values between pages using Struts2
couldn't get value back from <s:iterator> after submitting the <s:form>
Struts Form With AJAX
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014