asp.net mvc and jQuery with "Microsoft JScript runtime error: Object expected" -
i've got asp.net mvc view @ end following javascript code
<script language="javascript" type="text/javascript"> $(document).ready( function () { alert("this test"); }); </script>
the alert doesn't show when loading page. i've got following error: "microsoft jscript runtime error: object expected"
this section of site.master:
<link href="../../content/site.css" rel="stylesheet" type="text/css" /> <link href="../../content/controls.css" rel="stylesheet" type="text/css" /> <script src="../../scripts/jquery-1.4.1.min.js" type="text/javascript"></script> <script src="../../scripts/jquery-ui-1.8.6.custom.min.js" type="text/javascript"></script> <link href="../../content/ui-lightness/jquery-ui-1.8.6.custom.css" rel="stylesheet" type="text/css" /> <script src="../../scripts/jquery.ui.datepicker-nl.js" type="text/javascript"></script>
does has idea why got error? when delete alert, i've got error.
thanks,
filip
make sure scripts included correctly, example have:
<script src="../../scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
that may valid .master
is, invalid relative path page is, check out question setting relative paths to current page in master.
Comments
Post a Comment