Here are some very often used snippets of javascript. This is post #1 of a series of many…
Hide tabs:
tab0Tab.style.display = “none”;
tab1Tab.style.display = “none”;
Show Tabs:
tab0Tab.style.display = “block”;
tab1Tab.style.display = “block”;
Hide Form Field:
document.all.fieldName.disabled = true;
Show Form Field:
document.all.fieldName.disabled = false;
Get a reference to the IFrame:
var _iframe = document.getElementById(“IFRAME_iFrameName”);
Set the source of an IFrame at run-time:
crmForm.all.IFRAME_iFrameName.src = “http://yourcrm/_controls/notes/notesdata.aspx?id=” + crmForm.all.customerid.DataValue[0].id + “&ParentEntity=3&EnableInlineEdit=false&EnableInsert=false”;
Change the paremeters as you see fit.
More to come later. Enjoy!
Leave a Reply