I some divs with forms inside of them and i do have inputs with same ids but in different divs and forms so do like this:
$("divEdit form #ParentId").val(12);
it works on chrome/mozilla but not on IE8
anybody knows why ?
I some divs with forms inside of them and i do have inputs with same ids but in different divs and forms so do like this:
$("divEdit form #ParentId").val(12);
it works on chrome/mozilla but not on IE8
anybody knows why ?
You can't have multiple elements with the same id
on the same web page. You'll need to use some other method of identification such as a class
(or with form controls the same name
).
ID attributes must be unique in web pages. It's part of the specification and you will always run into issues using the same id more than once.