I am new to this JavaScript/IFrame Coding.
Can you tell m where I would need to put in my code for a horizontal Scroll?
iFRAME_OnLoad: function () {
// Grab the iFrame element.
// Check it's fully loaded and we have the page is correct.
var iFrame = document.getElementById("IFRAME_TIN_CLAIMS");
if (iFrame.readyState != "complete") { return; }
if (iFrame.src.indexOf("/_forms/print/print.aspx") == -1) { return; }
// Grab the preview iFrame as a jQuery object. Remove the toolbar.
var IF1 = jQuery("#IFRAME_TIN_CLAIMS");
IF1.contents().find("tr#printHeader").remove();
// Grab the sub-iFrame within the preview iFrame.
var IF2 = IF1.contents().find("iframe#printMain");
// Remove the big header and icon
IF2.contents().find("tr.ms-crm-Form-HeaderContainer").remove();
// Remove the big whitespace at the top
IF2.contents().find("div.ms-crm-Tab-Print").first().remove();
// Remove a bunch of whitespace around the second iFrame
IF2.contents().find("td.ms-crm-Form-Page-Main-cell").css("padding", "0px");
// Reinstate the whitespace next to the scrollbar
IF2.contents().find("td.ms-crm-Form-Page-Main-cell").css("padding-right", "0px");
// Remove the big whitespace at the bottom
IF2.contents().find("td.ms-crm-Form-Footer").parent().remove();
// Remove the header text. The text isn't within any specific tag so just performing a replace.
// The only part of the code that isn't directly re-usable
//IF2.contents().find("dhc_ppocaveragediscount_d").css("background-color", "red");
IF2.contents().find("div.ms-crm-Tab-Print").each(function () {
// jQuery(this).html(jQuery(this).html().replace("Contact Information", ""));
// jQuery(this).html(jQuery(this).html().replace("Provider TIN History", ""));
// jQuery(this).html(jQuery(this).html().replace("Notes", ""));
});
// Expand Op Site Data tab, revealing the fully rendered preview
var elTab = Xrm.Page.ui.tabs.get("general");
elTab.setDisplayState("expanded");
},
__namespace: true
};