i have a problem with my asp.net mvc3 page. i have a view which has a form in it to create a item of a specific model. it looks likt this:
@model testPro.Models.AddItemModel
@{
ViewBag.Title = "New";
}
@*<h2>New</h2>*@
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
@Html.ValidationSummary(true)
<fieldset>
<legend>New Item</legend>
<div class="editor-label">
@Html.LabelFor(model => model.UserItem.name)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.UserItem.name)
@Html.ValidationMessageFor(model => model.UserItem.name)
</div>
<p>
<input type="submit" value="Create" />
</p>
</fieldset>
}
<div>
@Html.ActionLink("Back to List", "Index")
</div>
<script>
$(document).ready(function () {
alert("test");
$("#UserItem_Name").html("bla");
$("#UserItem_Name").attr('disabled');
});
</script>
at the end i have my jquery stuff which should change the text-box.
the problem is, nothing is changing and i dont know why
and yes: i have jquery included in the header.