Click here to Skip to main content
15,880,608 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All !!

I am stuck with the "Object doesn't support this property or method" error. I have done all possible ways of checking the file path(jquery,css),name and also cleared the browser history after reading few articles. But no luck. I am using Mvc 4 and html 5.

Further when I created another project solution and added this to the view it worked fine. Only in my existing project this plugin is n't getting installed and throwing error "Object doesn't support this property or method".


Here is my problem :


1) I downloaded the jquery plugin for multiple select.

2) It has 3 main files :

- Jquery file - jquery.multiple.select.js-Placed in In Solution root folder
- CSS file - Placed in (In Solution root/)Content fold er
- Image - Placed in (In Solution root/) Images folder


Following is my code :
In Master Page :
<script type="text/javascript" src="~/Scripts/jquery-1.7.1.js"></script>
                 <script src="~/jquery.multiple.select.js"></script>
            <script type="text/javascript" src="~/Scripts/jquery-latest.js"></script>

In the Main Page :
C#
<script type="text/javascript">
$(document).ready(function () {
           $('select').multipleSelect();
       });
</script>

@using (Html.BeginForm("Index", "Home", FormMethod.Get, FormMethod.Post, new { @id = "Formparent", @name = "parentform" }))
{

<body>
 <table>
  <tr>
    <td>
      <select multiple="multiple">
        <option value="1">January</option>
        <option value="12">December</option>
      </select> 
    </td>
  </tr>
 </table>
</body>
}
Posted
Updated 24-Sep-13 0:37am
v3
Comments
ZurdoDev 24-Sep-13 23:28pm    
Which line of code is giving that error?
Akinmade Bond 25-Sep-13 12:53pm    
Were you referencing two JQuery libraries. JQuery latest should be 1.10.1 or 2.0, some plugins require a lower version. Try removing the line referencing the latest version of JQuery.
ashok prajapati 11 15-Dec-13 2:35am    
you are referring two scripts from "Scripts" folder and the multiple select js from "Root" folder. Have you kept it on root of your application?
adjeddi 1-Oct-15 7:59am    
I have the same problem, you have found a solution?

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