Hi,
I've inherited a project with some nasty JavaScript that depends on hard coded object ids.
i.e. There are lots of places where it does things like this
var magazine = document.getElementById('repModuleDisplay__ctl3_chkCats_0');
When the page renders in my UAT environment, the HTML looks like this, and everything works OK.
<input id="repModuleDisplay__ctl3_chkCats_0"
type="checkbox" name="repModuleDisplay:_ctl3:chkCats:0"
... etc
However, when I put it on my Production environment, the HTML is suddenly rending like this:
<input id="repModuleDisplay_ctl03_chkCats_0"
type="checkbox" name="repModuleDisplay$ctl03$chkCats$0"
... etc
The difference in ids means that the JavaScript can't find the Element, and fails.
In an ideal world, I'd scrap the buggy JavaScript and do it again properly, but for a quick fix, I'd like to know what is causing the difference in rendering between the two environments.
Does anyone have any ideas?
Thanks, Neil