views:

65

answers:

1

This works perfectly in Firefox but doesnt work in ie i get the following error "Line: 640 Error: Object doesn't support this property or method"

Here is my code

  <asp:TextBox ID="calendardatedob" CssClass="calendardatedob" runat="server" AccessKey="n" TabIndex="4" MaxLength="40" /><span
                    class="req">*</span> e.g dd/mm/yyyy

Here is my jquery

        $(document).ready(function() {

        $("#ctl00_PageContent_calendardatedob").datepicker();       
     });

im referencing these

<script src="../../assets/js/jquery.min.js" type="text/javascript"></script>
<script src="../../assets/js/jquery-ui-1.8.custom.min.js" type="text/javascript"></script>
A: 

I am not sure whether this is your error or not, but you can use Control.ClientID to get an element inside a naming container.

$("#<%= calendardatedob.ClientID %>").datepicker(); 

If this is also not working then check whether all the js files are loaded or not, using a DOM inspector.

rahul
ive changed to selector to .calendardatedob instead but still get error
Howlingfish
Try `$(".calendardatedob").length` and check whether it is `> 0`
rahul