Click here to Skip to main content
15,847,427 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In alert(brands) and alert(categories) i am getting values but it pass null to function (Brand: brands , Categorie: categories) other are working fine

Here is my Code:

C#
function doSomething() {
           
            var dob = $("#DOB").val();
          
            var address = $("#Address").val();
          
            var country = $("#Country").val();
           
            var pin = $("#Pin").val();
         
            var c_name = $("#Company_Name").val();
           
            var c_address = $("#Company_Address").val();
          
            var c_country = $("#Company_Country").val();
           
            var c_pin = $("#Company_Pin").val();
            
            var c_phone = $("#Company_Phone").val();
           
            var c_email = $("#Company_Email").val();
          
            var tan = $("#TAN").val();
      
            var pan = $("#PAN").val();
          
            var vat = $("#VAT").val();
           
            var about = $("#About_Business").val();
          
            var brands = $("#demo-cs-multiselect").val();
            alert(brands);
            var categories = $("#demo-cs-multiselect1").select;
            alert(categories)
            var lavel = $("#Lavel").val();
            // alert(lavel);
            $.ajax({
                cache: false,
                type: "POST",
                async: false,
                data: { DOB: dob, Address: address, Country: country, Pin: pin, Company_Name: c_name, Company_Address: c_address, Company_Country: c_country, Company_Pin: c_pin, Company_Phone: c_phone, Company_Email: c_email, TAN: tan, PAN: pan, VAT: vat, About_Business: about, Brand: brands , Categorie: categories, Lavel: lavel },

                url: "/Home/ProfileComplete",

                success: function (data) {
                    alert("Success");
                },
                error: function (e) {
                    alert("error");
                }
            });
        };

    </script>
Posted
Updated 7-Aug-15 5:46am
v2
Comments
ZurdoDev 6-Aug-15 8:45am    
Your code is all messed up. Please click improve question and fix.
John C Rayan 8-Aug-15 16:44pm    
It is unclear what your problem is. Clear explanation required.
Suket shah 12-Aug-15 5:41am    
can you please clearly mention your requirement.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900