开发者

auto suggest cant preview , but get the result

I am doing a login/logout page. I face a problem with auto suggest. If without the code below, the auto suggest is working with list. But if i add on the code below, the auto suggest not working mean i can't get the suggestion list. I have开发者_如何学C do some test, although can't get the list, the result will still appear.

Sorry, this is file for application.cfm , my autosuggest is another file.

 <cfif GetAuthUser() NEQ "">

  <cfquery name="loginQuery" dataSource="Reservation">
   SELECT *
    FROM User_Customer
    WHERE Email = '#GetAuthUser()#'

    </cfquery>

<cfoutput query="loginQuery">

   <form action="#CGI.script_name#?#CGI.query_string#"  name="test" method="post"> 
    <a href="##">#First_Name# #Last_Name#</a>
    <input type="submit" Name="Logout" value="Logout">
   </form>
  </cfoutput>
 </cfif>

I have try with <cfajaximport> , but fail to solve it.

The code below is autosuggest

<cfinput type="text"
         name="Name"
    maxlength="100"
    size="30"
    validateAt="onSubmit, onServer"
                                 autosuggest="cfc:Restaurants.LookupRestaurant({cfautosuggestvalue})">


You are outputting the HTML form, which is going to break your Ajax call. When the autosuggest ajax call runs, it will receive both the HTML form and the results which will no longer be in the format that the autosuggest widget expects.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜