Ajax call to JSP Page

Ajax call to JSP Page

Hello ,

I just started with using Ajax calls with Jquery now ;

The next piece of code is my jsp Page : " waypoints.jsp"
The second one is : my main page with the script.
The Thirth one is: div tag where i show the results.

But now the problem is when i edit my JSP to just normal text i can show it
But when i when want to add a <h:inputText value  it keeps on loading.

Can you help me or point out what i am doing wrong here?

Thanks in advance.

  1. <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" %>
        <h:inputText value="#{routeBean.tussenstop}" autocomplete="on" maxlength="100" tabindex="4" title="Tussenstop"  id="tussenstop" style="width: 33em;"  required="true"/>


  1. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
                                            <script type="text/javascript">
                                            
                                                $.ajaxSetup ({
                                                    cache: false
                                                });
                                                var ajax_load = "<img class='loading' src='images/load.gif' alt='loading...' />";

                                            //    load() functions
                                                var loadUrl = "waypoints.jsp";
                                                $("#load_basic").click(function(){
                                                    $("#result").html(ajax_load).load(loadUrl);
                                                });



                                                $("#load_post").click(function(){
                                                    $("#result")
                                                        .html(ajax_load)
                                                        .load(loadUrl, {language: "jsp", version: 5});
                                                });

                                                $("#load_callback").click(function(){
                                                    $("#result")
                                                        .html(ajax_load)
                                                        .load(loadUrl, null, function(responseText){
                                                            alert("Response:\n" + responseText);
                                                        });
                                                });



                                            //    $.post()
                                                $("#post").click(function(){
                                                    $("#result").html(ajax_load);
                                                    $.post(
                                                        loadUrl,
                                                        {language: "jsp", version: 5},
                                                        function(responseText){
                                                            $("#result").html(responseText);
                                                        },
                                                        "html"
                                                    );
                                                });
                                            </script>











































  1.  <div id="result"  class="functions"></div>