I am trying to access an item in MS CRM 2011 with the following identifier: account | NoRelationship | Form | B_GenerateInvoice-Large
I see this element in IE developer tools: 
Unfortunately, I always get null when trying to find this element.
I tried the following:
alert(document.getElementById('account|NoRelationship|Form|B_GenerateInvoice-Large')); alert($("[id='account|NoRelationship|Form|B_GenerateInvoice-Large]").html()); alert($(jq("account|NoRelationship|Form|B_GenerateInvoice-Large")).html()); // jq() adds the '#' and escapes special characters alert($("#account|NoRelationship|Form|B_GenerateInvoice-Large").html()); alert(document.getElementById("#account\\|NoRelationship\\|Form\\|B_GenerateInvoice-Large")); alert($("#account\\|NoRelationship\\|Form\\|B_GenerateInvoice-Large").html());
All of them cannot find the item.
Did I miss something obvious here?
Decision:
javascript was inside the iframe, while the element was outside the iframe.
I could not solve it.
source share