Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

JavaScript runtime error: Object doesn't support property or method 'datepicker'

$
0
0

m getting error for date picker while adding to a dynamic created textbox.

below is my code how text box is generating :

  <xsl:if test="@type='datetime'">
                  <input type="text">
                    <xsl:attribute name="name"><xsl:value-of select="@table" />[<xsl:value-of select="@column" />]</xsl:attribute>
                    <xsl:attribute name="value"><xsl:value-of select="@DefaultValue" /></xsl:attribute>
                    <xsl:attribute name="id">question_<xsl:value-of select="@QuestionID" /></xsl:attribute>
                    <xsl:attribute name="onfocus">myDatePicker(this);</xsl:attribute>
                    <xsl:if test="@SQLParams!=''">
                      <xsl:attribute name="onchange">Answer_Selected('<xsl:value-of select="@QueryString" />', '<xsl:value-of select="@QuestionID" />', '<xsl:value-of select="@table" />', '<xsl:value-of select="@column" />'); return false;</xsl:attribute>                      
                    </xsl:if>

And the js file what ever i added that is :

 <link href="../Scripts/jquery-ui-1.8.19.custom.css" rel="stylesheet" type="text/css" />  
    <script  type="text/javascript" src="../Scripts/jquery-1.7.2.min.js"></script>
   <script src="../Scripts/jquery-ui-1.8.19.custom.min.js" type="text/javascript"></script>

And the code js code where i called the function is in a js file i,e:

function myDatePicker(obj) {  
    $(obj).datepicker();
}

While click on textbox m getting error :JavaScript runtime error: Object doesn't support property or method 'datepicker'

PLZ HELP ME


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>