JAVA SCRIPT EN VRAC


Cacher un onglet . dans lequel on met tout ce qu'on veut pas voir 


doStuffOnload();


 


function doStuffOnload()


{


  //fOpenWindow(0,200,800,900,0,0);


    fCacheOnglet(".");


    oTableGen = document.getElementById("tab6");


    oNotification = document.getElementById("Notifications");


    oNotification.innerHTML = oTableGen.innerHTML;


    oNotification.style.display = "block";


  // SI CREATION


  if (crmForm.FormType == 1)


  {


 


  }


 


  oCols = document.getElementsByTagName("COL");


  oCols[0].width = "1";


 


/*


  //var navbar = document.getElementById('crmNavBar');


  crmNavBar.insertAdjacentHTML('beforeBegin', "<div align='Left'><IMG src='/invoke/ico_business.gif'></div>");


 


  //crmNavBar.style.background="no-repeat";


  //crmNavBar.style.backgroundImage="url(/Invoke/Employees.gif)";


 


 


//crmNavBar.style.display  = "none";


//crmNavBar.style.visibility = "hidden";


 


crmNavBar.all.navAddresses.style.display = "none";


crmNavBar.all.navRelationships.style.display = "none";


crmNavBar.all.nav_account_new_assets.style.display  = "none";


 


crmNavBar.all.navActivities.style.display = "none";


crmNavBar.all.navActivityHistory.style.display = "none";


 


crmNavBar.all.nav_account_new_operators.style.display = "none";


crmNavBar.all.nav_account_new_owners.style.display = "none";


crmNavBar.all.nav_account_new_accountadresses.style.display  = "none";


 


crmNavBar.all.navSubAct.style.display = "none";


crmNavBar.all.navOrders.style.display = "none";


crmNavBar.all.navQuotes.style.display = "none";


crmNavBar.all.navInvoices.style.display = "none";


 


crmNavBar.all._NA_CS.style.display = "none";


crmNavBar.all.navService.style.display = "none";


crmNavBar.all.navContracts.style.display = "none";


 


 


//crmNavBar.all._NA_MA.style.display = "none";


crmNavBar.all.navListsInSFA.style.display = "none";


crmNavBar.all.navCampaignsInSFA.style.display = "none";


 


if (crmForm.FormType == 1)


{


document.all.IFRAME_Owner.src="about:blank";


document.all.IFRAME_Operator.src="about:blank";


document.all.IFRAME_Open.src="about:blank";


document.all.IFRAME_History.src="about:blank";


document.all.IFRAME_Adresses.src="about:blank";


}


else


{


 


document.all.IFRAME_Operator.src="http://blogs.msdn.com/sfa/conts/areas.aspx?oId=" +


crmForm.ObjectId +


"&oType=1&security=852023&tabSet=account_new_operators";


 


document.all.IFRAME_Owner.src="http://blogs.msdn.com/sfa/conts/areas.aspx?oId=" +


crmForm.ObjectId +


"&oType=1&security=852023&tabSet=account_new_owners";


 


document.all.IFRAME_Open.src="http://blogs.msdn.com/sfa/conts/areas.aspx?oId=" +


crmForm.ObjectId +


"&oType=1&security=852023&tabSet=areaActivities";


 


document.all.IFRAME_History.src="http://blogs.msdn.com/sfa/conts/areas.aspx?oId=" +


crmForm.ObjectId +


"&oType=1&security=852023&tabSet=areaActivityHistory";


 


document.all.IFRAME_Adresses.src="http://blogs.msdn.com/sfa/conts/areas.aspx?oId=" +


crmForm.ObjectId +


"&oType=1&security=852023&tabSet=account_new_accountadresses";


 


}


 


ax_display_required_list();


*/


}


 


 


/////////


// Cache Onglet


function fCacheOnglet(psNomOnglet)


{


 for ( var i = 0; i < tabs.children.length; i++ )


 {


  if (tabs.children.item(i).innerHTML == psNomOnglet)


  {


               tabs.children.item(i).style.visibility='hidden';


               tabs.children.item(i).style.display='none';


  }


 }


}


 


 


/////////


function fOpenWindow(pTop,pLeft,pH,pL, nSpaceLarg, nSpaceHaut)


{


               if (pH == 0) {pH = screen.width - 2*nSpaceLarg};


               if (pL == 0) {pL = screen.height - 2*nSpaceHaut - 25};


 


               if (pTop == 0) {pTop = nSpaceHaut };


               if (pLeft == 0) {pLeft = nSpaceLarg };


 


               window.resizeTo(pH,pL);


               window.moveTo(pLeft,pTop);


}


 


function ax_display_required_list ()


{


    var htmltitle = '<div><div class="lbTitle" id="_AX_NA_Required" tabIndex="0" title="Click here for more areas" style="display: none;"><img align="absMiddle" src="http://blogs.msdn.com/_imgs/navup.gif" /> Required Fields</div>';


    var htmllist = '<span class="lbArea" style="display: inline;">';


    var k = 0;


    var fields = new Array();


    var label;


    showcount = 0;


 


 


    for (var i = 0; i < crmForm.all.length; i++)


    {


        if (crmForm.all[i].Disabled != null && crmForm.all[i].RequiredLevel == 2)


        {


            k++;


            label = document.getElementById(crmForm.all[i].id + '_c');


            if (label != null)


            {


                htmllist = htmllist + '<div class="lbItem lnOn" id="ax_nav_' + crmForm.all[i].id + '" tabIndex="0" title="' + label.innerText + ' is required." onclick="crmForm.all.' + crmForm.all[i].id + '.SetFocus();" style="display: none;"><img class="icon" align="absMiddle" src="http://blogs.msdn.com/_imgs/ico/16_alert.gif"><nobr class="lbText" style="width: 105px;" title="' + label.innerText + ' is required."> ' + label.innerText + '</nobr></div>';


                crmForm.all[i].attachEvent('onchange', ax_all_onchange);


                fields.push(i);


            }


        }


    }


 


    htmllist = htmllist + '</span>';


    var htmlclose = '</div>';


    // find the nav bar


    var navbar = document.getElementById('crmNavBar');


    navbar.insertAdjacentHTML('beforeEnd', htmltitle + htmllist + htmlclose);


   


    // go back through and show them etc


    for (var i = 0;i < fields.length; i++)


    {


        if (crmForm.all[fields[i]].DataValue == null)


            ax_show_required_field(crmForm.all[fields[i]].id);


    }   


 


 


}


 


 


function ax_all_onchange ()


{


    if (event.srcElement.DataValue == null)


        ax_show_required_field(event.srcElement.id);


    else


        ax_hide_required_field(event.srcElement.id);


}


 


function ax_show_required_field (field)


{


    var d = document.getElementById('ax_nav_' + field);


    if (d != null && d.style.display != 'block')


    {


        d.style.display = 'block';


        showcount++;


    }


    if (showcount > 0)


        document.getElementById('_AX_NA_Required').style.display = 'block';


}


 


function ax_hide_required_field (field)


{


    var d = document.getElementById('ax_nav_' + field);


    if (d != null && d.style.display != 'none')


    {


        d.style.display = 'none';


        showcount--;


        if (showcount == 0)


            document.getElementById('_AX_NA_Required').style.display = 'none';


    }


}


Skip to main content