On some View page I have two partial views (their html is the same). With first one work this script but with second not work .
<script type="text/javascript">
$(document).ready(function() {
$('input:radio').click(function() {
var location = $("input:checked").val();
var article_number = $("input[id=MArticleNumber]").val();
$.post("/ImportXML/DevAccEditTempTable", { location: location, article_number: article_number }, function(data) {
if ($("input[id='check']:checked").val() == 'a') {
alert("page for new device")
}
else {
window.location.href = "/" + data.redirect;
}
},"json");
});
});
</script>
Problem occurs when try to get article_number because I have two input boxes with some id (id=MArticleNumber). If change the second id to id=MArticleNumber1 then have two article numbers but I have to pass to action DevAccEditTempTable only one article number.