Skip to main content

Content tagged with Nintex forms JavaScript jQuery dropdown

I have a drop down on the selection of this dropdown I am filtering the value from a sharepoint list and setting the another dropdown using the below code...

 

function Category Dropdown() {

var custDrpDwnVal = NWF$("#" + BusinessArea).val();
var context = new SP.ClientContext();
        var oList = context.get_web().get_lists().getByTitle('Categories List');
        var camlQuery = new SP.CamlQuery();    
  camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name='Title'/><Value Type='Text'>'+custDrpDwnVal+'</Value></Eq></Where></Query></View>');
        selectedListItems = oList.getItems(camlQuery);
  context.load(selectedListItems); 
  context.executeQueryAsync(Function.createDelegate(this, this.onSelectedListSuccessMethod), Function.createDelegate(this, this.onSelectedListFailureMethod));  

}

function onSelectedListSuccessMethod(sender, args)
{
var selectedListEnumerator = selectedListItems.getEnumerator();
var options = "";
var category = NWF$("#" + Category);
while (selectedListEnumerator.moveNext())
           {
     var oListItem = selectedListEnumerator.get_current();        
           var  categories = oListItem.get_item('Category_x0020_Value');
     options += "<option value='" + categories + "'>" + categories + "</option>";     
    }
       category.html(options);   
}

 

I get the value in my dropdpown but when i save these values i get a co relation id error and checked the logs and found below error :

1.  Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.     at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument)  

Can anyone know about this

Reply