Newbie - sorry. Autocompletion problem

Eddie
2013-03-01
2013-03-03
  • Eddie

    Eddie - 2013-03-01

    Hi I'm a newbie and want to know if the complete binary distribution consists of only ajaxtags-1.5.7.jar and ajaxtags-resources-1.5.1.jar. I am coding an autocomplete task and nowthins seems to happen when I click into the input field . If anyone can see anything obviosuly worng with the JSP I would appreciate it. AFAIK it should work unless I am missing some libraries (hence the question). Here is my JSP:

    `````````````````````

    <%@ taglib uri="http://ajaxtags.sourceforge.net/tags/ajaxtags" prefix="ajax" %>

    <html>

    <head><title>Sample Auto-Completion AJAX call</title>
       <!--Step 2 -->
       <script type="text/javascript" src="js/prototype.js"></script>
       <script type="text/javascript" src="js/scriptaculous/scriptaculous.js"></script>
       <script type="text/javascript" src="js/overlibmws/overlibmws.js"></script>
        <script type="text/javascript" src="js/ajaxtags.js"></script>
    
    <link rel="stylesheet" type="text/css" href="css/ajaxtags.css" />
    <link rel="stylesheet" type="text/css" href="css/displaytag.css" />
      <!--Step 3 -->
         <!-- defaults for Autocomplete and displaytag -->
         <link type="text/css" rel="stylesheet" href="css/ajaxtags.css" />
         <link type="text/css" rel="stylesheet" href="css/displaytag.css" />
    
    </head>
    <body>
        <h1>Welcome to Auto-Completion POC </h1>
    <form>
      Make: <input id="model" name="model" type="text" size="100" class="form-autocomplete" />
      Model: <input id="make" name="make" type="text" size="100" />
    
    </form>
    
    <!--Step 5 -->
    <ajax:autocomplete
      baseUrl="${pageContext.request.contextPath}/servlets/GetModel.view"
      source="make"
      target="model"
      parameters="model={model}"
      className="autocomplete"
      indicator="throbbing"
      minimumCharacters="2" />
    </body>
    

    </html>

    ````````````````````````
    TIA,

    Eddie

     
  • Victor Homyakov

    Victor Homyakov - 2013-03-01

    Hello!

    Maybe installation isn't described properly, but as you can see Ajaxtags needs four JavaScript files:

    <script type="text/javascript" src="js/prototype.js"></script>
    <script type="text/javascript" src="js/scriptaculous/scriptaculous.js"></script>
    <script type="text/javascript" src="js/overlibmws/overlibmws.js"></script>
    <script type="text/javascript" src="js/ajaxtags.js"></script>
    

    The script files are placed in ajaxtags-resources-1.5.1.jar and can be used in two ways:

    1. Unpacked from jar file and placed into appropriate folders (js/, js/scriptaculous/, js/overlibmws/ and js/ respectively).

    2. Downloaded directly from the jar file via servlet. Actual example is in ajaxtags-demo-1.5.7.war:

      • servlet settings are in WEB-INF/web.xml:

        <servlet>
                <servlet-name>sourceloader</servlet-name>
                <servlet-class>net.sourceforge.ajaxtags.servlets.SourceLoader</servlet-class>
                <init-param>
                        <param-name>prefix</param-name>
                        <param-value>/ajaxtags</param-value>
                </init-param>
        </servlet>
        <servlet-mapping>
                <servlet-name>sourceloader</servlet-name>
                <url-pattern>/ajaxtags/js/*</url-pattern>
        </servlet-mapping>
        
      • and script paths are in index.jsp:

        <script type="text/javascript" src="ajaxtags/js/prototype.js"></script>
        <script type="text/javascript" src="ajaxtags/js/scriptaculous/scriptaculous.js"></script>
        <script type="text/javascript" src="ajaxtags/js/overlibmws/overlibmws.js"></script>
        <script type="text/javascript" src="ajaxtags/js/ajaxtags.js"></script>
        
     
  • Eddie

    Eddie - 2013-03-03

    Hi Victor,

    thanks for that. I didn't see the ajaxtags-demo-1.5.7.war. Between the demo and your suggestion I have it working.

    Thanks again !

    Eddie

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks