JQuery Autocomplete Stops Working After Postback - InfoPath Dev
in

InfoPath Dev

JQuery Autocomplete Stops Working After Postback

Last post 11-21-2012 08:55 AM by Gennady Vanin (Геннадий Ванин, Новосибирск). 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-21-2012 01:27 AM

    JQuery Autocomplete Stops Working After Postback

    I have an autocomplete script that works ok in the sense that it shows the options to select from after the user types 2 letters. Now, the problem I have is that after the selection is made and the text field is filled out, the script stops. For example, if I make a selection from the given entries, and for some reason I have clear the text field, once I start typing again, the autocomplete doesn't show anything at all. The form performs a postback everytime I select values from a couple of dropdown controls, and I noticed the script stops once the postbacks are triggered. Is there any way I can have the scripts running after each postback? If anybody can point the right directions, I would really appreciate it. notice that i used a List Form so i cannot use code. Thanks. <script language="javascript" src="/Scripts/jquery-1.7.1.min.js" type="text/javascript"></script> <script language="javascript" src="/Scripts/jquery.SPServices-0.7.1a.min.js" type="text/javascript"></script> <script language="javascript" src="/Scripts/jquery-ui-1.8.22.custom.min.js" type="text/javascript"></script> <link href="/Scripts/jquery-ui-1.8.22.custom.css" rel="stylesheet" type="text/css"/> <script language="javascript" type="text/javascript"> //Wait ##### seconds for form to load before calling the function. window.onload = function(){ window.setTimeout(readyCall, 1000); } function readyCall(){ //Variable for Array where Title column values will be pushed to. var Requestors = []; //Variable for the Requestor Text Field. var RequestorField = "input[id$='FormControl0_V1_I1_T2']" //Call the SPServices library. $().SPServices({ operation: "GetListItems", listName: "Requestor", CAMLViewFields: "", async: false, completefunc: function (xData, Status){ $(xData.responseXML).SPFilterNode("z:row").each(function(){ Requestors.push($(this).attr("ows_Title")); }); } }); //Input field from form.
  • 11-21-2012 04:35 AM In reply to

    Re: JQuery Autocomplete Stops Working After Postback

    InfoPathBeginner:
    an autocomplete script that works ok
     

    Where this script works? In Infopath form?

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 11-21-2012 05:24 AM In reply to

    Re: JQuery Autocomplete Stops Working After Postback

    Hi , this scripts is an Content editor webapart ,thanks for your help
  • 11-21-2012 08:55 AM In reply to

    Re: JQuery Autocomplete Stops Working After Postback

     My guess is that this is in a Web Part Page and  Infopath form can be used there as Infopath Form Web Part? with the latter permitting only one connection per webpart?
    I am not getting what you are doing or trying to accomplish...

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.