jQWidgets Forums

jQuery UI Widgets Forums Navigation Tree jqwidgets tree invalid error value for

This topic contains 3 replies, has 2 voices, and was last updated by  Nadezhda 10 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • abhijeetchindhe
    Participant

    Please check the Image. I am suddenly getting this error on one of my system while binding a tree.

    https://drive.google.com/file/d/0BxHJwh5wwfQiZUFrLWhLeGExWE0/view?usp=sharing

    It works well in other systems but somehow i get this error in one of the system.

    Here’s piece of code that I am using while binding tree.

    ——————————————————————————————————–

     jQuery.ajax({
    	type: "GET",
    	url: "",
    	contentType: "application/x-www-form-urlencoded; charset=UTF-8",
    	dataType: "json",
    	success: function (data) {
    		appId = data;
    		var appDetailsId;
    		var source;
    		/* - bring Id of this AppName - */
    		var tree = $('#jqxMisssingEle');
    		$.ajax({
    			async: false,
    			url: "",
    			success: function (data, status, xhr) {
    				source = data;
    				tree.jqxTree({ source: source, height: 320, width: 200 });
    				tree.on('expand', function (event) {
    					var label = tree.jqxTree('getItem', event.args.element).label;
    					if (label == "<img src='Images/folderOpen.png'/> <b>PROGRAM NAME</b>") {
    						return false;
    					}
    					var $element = $(event.args.element);
    					var loader = false;
    					var loader1 = false;
    					var loaderItem = null;
    					var children = $element.find('li');
    					$.each(children, function () {
    						var item = null;
    						item = tree.jqxTree('getItem', this);
    						if (item && item.label != 'Loading') {
    							loaderItem = item;
    							loader = true;
    							loader1 = false;
    							return false
    						};
    					});
    
    					if (loader) {
    						$.ajax({
    							async: false,
    							url: baseUrl + "RetrievesFileListSubParentMissingElements?parentId=" + loaderItem.value + "&AppId=" + appId,
    							success: function (data, status, xhr) {
    								var items = null;
    								items = data;
    								tree.jqxTree('addTo', items, $element[0]);
    								for (j = 0; j < data.length; j++) {
    									tree.jqxTree('removeItem', loaderItem);
    								}
    
    							},
    
    							error: function () {
    								// alert('ERROR');
    							}
    
    						});
    					}
    
    				});
    
    				if (!('contains' in String.prototype)) String.prototype.contains = function (str, startIndex) {
    					return -1 !== String.prototype.indexOf.call(this, str, startIndex);
    				};
    
    				var count = document.getElementsByClassName('jqx-tree-dropdown').length;
    				var selectedFileName = document.getElementsByClassName('draggable jqx-rc-all jqx-tree-item jqx-item');
    				for (var i = 0; i < selectedFileName.length; i++) {
    					if (selectedFileName[i].innerHTML.contains(sFile) == true) {
    						selectedFileName[i].style.background = "#427DC7";
    						selectedFileName[i].style.color = "#ffffff";
    						break;
    					}
    				}
    			},
    			error: function () {
    				//alert ('Error');
    			}
    
    		});
    		
    	}
    });
    

    Nadezhda
    Participant

    Hello abhijeetchindhe,

    Please, change the image permissions or provide new image.

    Best Regards,
    Nadezhda

    jQWidgets team
    http://www.jqwidgets.com/


    abhijeetchindhe
    Participant

    Hi,

    Can you please check on this link ?

    Error

    Or

    Error Message


    Nadezhda
    Participant

    Hi abhijeetchindhe,

    Could you use the following lines

    	success: function (data) {
    		appId = jQuery.parseJSON(data);
    		var appDetailsId;
    		var source;

    instead

    	success: function (data) {
    		appId = data;
    		var appDetailsId;
    		var source;

    ? If this suggestion does not help you to fix the issue, please, provide us with a sample of your JSON data.

    Best Regards,
    Nadezhda

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.