var document getElementById navOpps navOpps click function debugger va

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
var z = document.getElementById("navOpps");
$('#navOpps').click(function() {
//debugger
var oppIframe = document.getElementById("areaOppsFrame");
if (oppIframe)
{
oppIframe.onreadystatechange = function DoSmething() {
if (oppIframe.readyState == "complete") {
//alert(oppIframe.readyState);
debugger
var iFrame = frames[window.event.srcElement.id];
var liElements = iFrame.document.getElementsByTagName('li');
var buttonTitles = "Add a new Opportunity to this record";
var btnId = "_MBlocAddRelatedToNonForm32GUID";
var x = document.getElementById(btnId);
for (var i = 0; i < liElements.length; i++) {
//if (liElements[i].getAttribute('title') == buttonTitles) {
if (liElements[i].getAttribute('id') == btnId) {
alert("ok");
//liElements[i].style.display = 'none';
break;
}
}
}
}
}
});