Tuesday, January 11, 2011

CRM and jQuery

o1.Add JQuery to crmForm Load Event.
function IncludeExternalScript(scriptFile)
{
var netRequest = new ActiveXObject("Msxml2.XMLHTTP");
netRequest.open("GET", scriptFile, false);
netRequest.send(null);
eval(netRequest.responseText);
}

IncludeExternalScript('http://"Your Link"/_common/styles/test/jquery-1.4.1.js');

$(document).ready(function () {
alert('test');
});


02.Create Dynamic Elements
var body=document.getElementById("tab0");
var boxes = document.createElement("<div id='boxes'/>");
body.appendChild(boxes);

03.Add css in Jquery
$(' #boxes .window').css({ 'width': '440px', 'height': '220px', 'position': 'absolute', 'left': '0', 'top': '0', 'z-index': '9999', 'padding': '20px', 'display': 'none' });

No comments:

Post a Comment