2
Contributors
7
Replies
8
Views
6 Years
Discussion Span
Last Post by coolest_987
0

If by control key you mean the key on the keyboard, you cannot with PHP.

While it is possible to disable keys using Javascript, the user turning off Javascript would render this useless.

Why would you want to disable a key anyway?

0

Yes i want it to disable control on iframe using javascript but i was not able to do that..

1

Generally speaking, you should not (as a web developer) be attempting to alter the browser functionality.

There are very few cases where this should be considered acceptable.

If you are interested in the javascript, a very quick Google search will tell you what you need to know.

Votes + Comments
Agreed.
0

Yes i did google but i was not able to find out the solution,if u have any pointers please let me know

Thanks

0

Here is the code

<script language="javascript">
var IFRAME_test = null;



function OnCrmPageLoad()
{
    //Set Object Variable
    IFRAME_test = document.all.IFRAME_test; 

    //Attach to the change event
    IFRAME_test.attachEvent( "onreadystatechange" , OnIframeTestReady );
    IFRAME_test.src = getFrameSource('new_abcs_new_tests');
}

function OnIframeTestReady()
{
    //Override the onmousedown event
    IFRAME_test.contentWindow.document.onmousedown = function(){
                alert("This iframe is ReadOnly");
                return false;
    };
}



getFrameSource = function( tabSet ) 
{
   if (crmForm.ObjectId !=null) 
   {
      var oId = crmForm.ObjectId;
      var oType = crmForm.ObjectTypeCode;
      var security = crmFormSubmit.crmFormSubmitSecurity.value;
            return "areas.aspx?oId="+ oId + "&oType=" + oType + "&security=" + security+ "&tabSet=" + tabSet;
   }
   else 
   {
      return "about:blank";
   }
}

Edited by Nick Evan: Fixed formatting

0

call this on

<body onload="openPdf()" onload="OnCrmPageLoad()" onload="OnIframeTestReady()" onload="function( tabSet )">

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.