Text box getting cleared on post back - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

Text box getting cleared on post back

Last post 01-23-2014 12:07 AM by Ramkumar. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 01-23-2014 12:07 AM

    Text box getting cleared on post back

    I have created the textbox in infopath ,Here I have used auto suggest control for a textbox, I will load value and ID in that text box , on selecting a value in auto suggest on the textbox an id will be generated for that selected value, I need to store that is in another text box,on post back the stored ID is getting cleared in that text box is there any solution for this. window.onload = function() { window.setTimeout(getData, 1000); } function getData(){ getState(); window.setTimeout(getData, 1000); //To handle IP's form postback } function getState(){ var state = []; $().SPServices({ operation: "GetListItems", listName: "state", CAMLViewFields: "", async: false, completefunc: function (xData, Status) { $(xData.responseXML).SPFilterNode("z:row").each(function() { state.push({label:$(this).attr("ows_Column2"),value:$(this).attr("ows_ID")}); }); } }); $("input[id$='FormControl0_V1_I1_T22']").autocomplete({ source: state, minLength: 2, change: function (event, ui) { }, select: function( event, ui) { alert(ui.item ? ("You picked '" + ui.item.label + "' with an ID of " + ui.item.value) : "Nothing selected, input was " + this.value); $("input[id$='FormControl0_V1_I1_T22']").val(ui.item.label); $("input[id$='FormControl0_V1_I1_T23']").val(ui.item.value); return false; }, focus: function(event, ui){ event.preventDefault(); $("input[id$='FormControl0_V1_I1_T22']").val(ui.item.label); return false; } }); } Thanks in advance.
    Filed under: , ,
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.