Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling or Removing the ChangeRequestType Button in HPD 7.5

Highlighted
davensky_itrc
Occasional Advisor

Disabling or Removing the ChangeRequestType Button in HPD 7.5

I wanted to disable or remove the Change Request Type button and I could remove the button using the code below in FIREFOX. But the same code doesn't work in INTERNET EXPLORER version 7.0 at all!


function CUS_disableButtReqTypChg (){

var arr = new Array();
arr = document.getElementsByTagName( "*" );
// alert("Total Number of HTML Elements Found: " + document.getElementsByTagName( "*" ).length);
for(var i=0; i < arr.length; i++) {
var tagName = document.getElementsByTagName( "*" ).item(i).nodeName;
var tagObj = document.getElementsByTagName( "*" ).item(i);
// alert("TagName: " + tagName + "\n\ninnerText:\n" + tagObj.innerHTML);

if (tagObj.childElementCount > 0){

//var myClass = new RegExp("A-ZÄÖÜ]ndern");
var myStr = tagObj.textContent;
var myStr = myStr.substring(1);
if (myStr == "ndern"){
//if (myClass.test(myStr.toString)){
//showMessage(i,true);
tagObj.className='funBtn funBtnRem';
//tagObj.innerHTML='Ändern';
tagObj.innerHTML='';
//this.changeRequestTypeFlag = false;
//tagObj.disabled = true;
//this.FM.CHANGE_TO_REQUEST_TYPE.disabled = true;
//this.FM.REQUEST_TYPE_ID.disabled = true;
}
}
}

}


Does anybody know why it is not working in IE?

Thanks!
2 REPLIES
Raj Ghimire
Occasional Visitor

Re: Disabling or Removing the ChangeRequestType Button in HPD 7.5

Can you elaborate a little more on what exactly you are trying to Disable, may be with a screenshot. I don't understand why you are haing to use a Code for it.
-Raj
davensky_itrc
Occasional Advisor

Re: Disabling or Removing the ChangeRequestType Button in HPD 7.5

I actually found out why it is not working in IE. I changed some of codes to conform to the DOM and it is working now.

The reason why I had to write the function was, I wanted to write a Rule to disable the Change Request Type button on a request based on the status of the request. Then I figured out that in HPDemand version 7.5 the field name "ChangeRequestType???" was not visible! That means I could not write the Rule because of this as I had to have a condition field to select.

Any way, thanks
//Add this to "OnDomLoad" event