Hi, I have a javascript inside a partial view that sits in a parent view. There is a submit button on the partial view that when clicked I would like to fire an alert.
<script type="text/javascript">
$(function () {
var selectedName = $("#selectaname");
$("#sendMail").click(function () {
if (selectedName.val() == "someValue") {
alert("You need to select the correct name");
return false;
}
});
});
</script>
How can I show my jquery alert from within a child view? Any help would be greatly appreciated!