HTML element not accessible with jQuery
Posted
by Kris-I
on Stack Overflow
See other posts from Stack Overflow
or by Kris-I
Published on 2010-03-17T19:35:46Z
Indexed on
2010/03/17
19:41 UTC
Read the original article
Hit count: 440
jQuery
|asp.net-mvc
Hello,
I have a via with some jQuery function to get value from HTML element (to access element available and element not yet available). On of these element is a dropdown, when I select a value an another vue is added in the bottom of the page in a div. When I try to access an element added by this view, I received "undefined". What can I do ?
In the div #ProductDetail, I add element. and it's these elements I can't access.
$.ajax({
type: "POST",
url: "/Product/Edition",
data: {
id: getId()
},
success: function(data) {
$("#divDisplayDialogProduct").html(data);
$('#ProductType').change(function() {
$.ajax({
type: "POST",
url: "/Product/ShowDetail",
data: { id: $('#ProductType').val() },
success: function(data) { $("#ProductDetail").html(data); },
error: function(XMLHttpRequest, textStatus, errorThrown) { }
})
});
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
}
})
© Stack Overflow or respective owner