title: How do I access a DIV from javascript, if ASP.NET mangles its ID?
body: <p>I have a web page that contains a "div" element.  On the page, there is javascript to reference the div: <code>document.getElementById('divId')</code>.  This was working fine until another developer redesigned the page to use an ASP master page.</p>
  
  <p>Now, <code>document.getElementById('divId')</code> returns null.  It appears that ASP.net prepends some characters to the names of elements within contents forms when you use a master page.  How can I know what the id of the div is when the page loads?</p>
  
  <p><b>Update</b> Allow me to give a specific example to clarify the question:  My page had a div with ID <code>divNotice</code>.  After changing my page to use a master page, I see when I print the source to the page that renders that the div ID is <code>ctl00_ContentPlaceHolder1_divNotice</code>.  My question is, how am I supposed to know what the div ID is going to be when the framework is done with it?</p>