jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList Dropdownlist | Selection Renderer Form Refresh Issue

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 6 months ago.

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

  • raj
    Participant

    Hi,

    I’ve a currency drop down list which contains a text and country flag. While selection I render the drop down list selected value with the text and country flag by returning the HTML string. During selection my form is getting refreshed, this behavior is seen only in IE7

    Mentioned below is the code for your reference.

    currencyList -> JSON string
    
    $("#userPrefForm_refccy").jqxDropDownList({ source: currencyList,height: 22,displayMember: "currencyCode", valueMember: "currencyCode", enableBrowserBoundsDetection:true, selectedIndex: 0,
    	renderer: function (index, label, value) 
    	{
    		if(index!=0){
    			var cyCode=currencyList[index].countryISO2Code;
    			if(cyCode=='' || cyCode==null){
    				cyCode="empty"
    			}
    			return '<span class="flagLeft">'+label+'</span><span class="'+'flag '+'flag_'+cyCode+'"></span>';
    		}
    		else{
    			return '<span>'+label+'</span>';
    		}
    	},
    	selectionRenderer: function (htmlString,index){
    		if(index!=0){
    			var cyCode=currencyList[index].countryISO2Code;
    			if(cyCode=='' || cyCode==null){
    				cyCode="empty"
    			}
    			return '<span class="flagLeft">'+$(htmlString).text()+'</span><span class="'+'flag '+'flag_'+cyCode+'"></span>';
    		}
    		else{
    			return '<span>'+$(htmlString).text()+'</span>';
    		}
    	}
    });

    I’m using jQWidgets v3.2.2

    Can someone suggest me a cross browser solution for this issue.

    Looking for swift response.

    Thanks,
    Raj


    Peter Stoev
    Keymaster

    Hi Raj,

    The DropdownList’s selection has nothing related to your Form’s refresh. The only possible reason for your Form to refresh on selection is if you do something within the “select” or “change” event of the DropdownList like form.reset or form.submit.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.