
We have a requirement, to call a Javascript function on web resource html, from form javascript file.
Code from From javascript:
var _htmlCtrl = Xrm.Page.getControl('WebResource_CRD_Search');
if (_htmlCtrl != null && _htmlCtrl.getControlType() == "webresource") {
var _htmlObj = _htmlCtrl.getObject();
if (typeof _htmlObj.contentDocument != "undefined") {
if (_htmlObj.contentDocument.getElementById('Number') != null) {
_htmlObj.contentDocument.getElementById('Number').value = _vfValue;
//_htmlObj.__FindNumber();
}
}
}
web resource : HTML (WebResource_CRD_Search)
Function: __FindNumber()
*This post is locked for comments
I have the same question (0)I found a way to call the function.
_htmlObj.contentWindow.window.__FindCase();
Ref: www.develop1.net/.../Calling-a-function-in-a-Html-Webresource-from-another-Javascript-Webresource