I have a problem embarrassing problem with hidden field not being part of DOM; at least I cannot find it using JavaScript. Field has “id” and “name” attributes, it is in the form, has a value and can be seen when looking at the view source in browser. So, I attach a click handler to a button, which looks for a hidden field using either document.getElementById or using jquery selectors (any combination of the selectors, by Id, by class name etc) and it is not part of DOM. How is this possible, or is it even possible? What could be a cause if this?
Edit:
Markup is huge, so I did not want to paste it in here. My question was basically, is it possible for hidden field to be missing from DOM. Why are people down-voting this? Is it not a valid question?
Maybe the field has been removed, the browsers viewsource doesn’t care about changes of the DOM(It is just the response he gets from the server).
Use e.g. firebugs HTML-tab to inspect the current DOM.