Zoeken in deze blog

maandag 4 mei 2009

IFRAME 1:N

if(crmForm.FormType != 1)
{
function OnCrmPageLoad()
{
/* Create a N2NViewer and give it the IFRAME (container) id */
var n2nViewer = new N2NViewer('IFRAME_Test');
/* assing the relationship name */
n2nViewer.TabsetId = "new_account_new_test";
/* Do the trick... */
n2nViewer.Load();
}
function N2NViewer(iframeId)
{
if (!document.all[iframeId])
{
alert(iframeId + " is missing!");
return;
}
var viewer = this;
var _locAssocObj = null;
viewer.IFRAME = document.all[iframeId];
viewer.RoleOrder;
viewer.TabsetId;
viewer.Load = function()
{
/* Construct a valid IFRAME url */
viewer.IFRAME.src = "areas.aspx?oId=" + crmForm.ObjectId + "&oType=" + crmForm.ObjectTypeCode + "&security=" + crmFormSubmit.crmFormSubmitSecurity.value + "&tabSet=" + viewer.TabsetId;
viewer.IFRAME.onreadystatechange = viewer.StateChanged;
}
viewer.StateChanged = function()
{
if (viewer.IFRAME.readyState != 'complete')
{
return;
}
var iframeDoc = viewer.IFRAME.contentWindow.document;
/* Remove scrolling space */
iframeDoc.body.scroll = "no";
/* Remove crmGrid Default padding */
iframeDoc.body.childNodes[0].rows[0].cells[0].style.padding = 0;
/* Save MS locAssocObj */
_locAssocObj = locAssocObj;
/* Override MS locAssocObj */
locAssocObj = viewer.locAssocObj;
}
viewer.locAssocObj = function(iType , sSubType, sAssociationName, iRoleOrdinal)
{
/* Open the Dialog */
_locAssocObj(iType , sSubType, sAssociationName, iRoleOrdinal);
}
}
crmForm.all.IFRAME_Test.setAttribute("isArea",1);

//Entry Point
OnCrmPageLoad();
}

Geen opmerkingen:

Een reactie posten