Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery does not call struts2 action?
    primarykey
    data
    text
    <p>I have followed the autocomplete <a href="http://www.celinio.net/techblog/?p=243" rel="nofollow">example</a>, but things not working out.</p> <p>the JSP search page:</p> <pre><code>&lt;%@ taglib prefix="s" uri="/struts-tags"%&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;title&gt;JSP Page&lt;/title&gt; &lt;script src="${pageContext.request.contextPath}/js/jquery-1.9.0.js"&gt;&lt;/script&gt; &lt;script src="${pageContext.request.contextPath}/js/jquery-ui-1.10.0.js"&gt;&lt;/script&gt; &lt;script src="${pageContext.request.contextPath}/js/jquery.bgiframe.min.js"&gt;&lt;/script&gt; &lt;script src="${pageContext.request.contextPath}/js/jquery.ajaxQueue.js"&gt;&lt;/script&gt; &lt;script src="${pageContext.request.contextPath}/js/thickbox-compressed.js"&gt;&lt;/script&gt; &lt;script src="${pageContext.request.contextPath}/js/jquery.autocomplete.js"&gt;&lt;/script&gt; &lt;link href="${pageContext.request.contextPath}/css/jquery.autocomplete.css" rel="stylesheet" type="text/css" /&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;Hello World!&lt;/h1&gt; &lt;s:textfield id="listCats" name="displayedCatId" key="label_choose_topic" size="80" cssClass="selectedCat" /&gt; &lt;/body&gt; &lt;/html&gt; &lt;script type="text/javascript" &gt; $().ready(function() { $("#listCats").autocomplete('/listCategory.action', { minChars: 1, max: 15, multiple: false, autoFill: true }); }); &lt;/script&gt; </code></pre> <p>in struts.xml</p> <pre><code>&lt;action name="listCategory" class="qaplus.action.question.LoadCategoryAction" method="loadCategory"&gt; &lt;result name="success"&gt;/WEB-INF/jsp/list_category.jsp&lt;/result&gt; &lt;/action&gt; </code></pre> <p>The problem is that jQuery function does not call the <strong>listCateory</strong> action.</p> <p>Am I missing something?</p> <p>Edit: The java script console reports:</p> <pre><code>Uncaught TypeError: Cannot read property 'opera' of undefined jquery.autocomplete.js:83 $.Autocompleter jquery.autocomplete.js:83 (anonymous function) jquery.autocomplete.js:32 jQuery.extend.each jquery-1.9.0.js:631 jQuery.fn.jQuery.each jquery-1.9.0.js:253 $.fn.extend.autocomplete jquery.autocomplete.js:31 (anonymous function) sample.jsp:34 fire jquery-1.9.0.js:1017 self.fireWith jquery-1.9.0.js:1127 jQuery.extend.ready jquery-1.9.0.js:416 DOMContentLoaded </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload