Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
453 views
in Technique[技术] by (71.8m points)

javascript - contentWindow iframe crm 2016

please find below the code where I am trying to access a Webresource. I am working on CRM 2016

var xyz= window.xyz|| {};

$("#WebResource").contentWindow.xyz.Scheduler.load();

Gives out "Unable to get property 'contentWindow' of undefined or null reference" message.

Need help.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Don't manipulate the DOM, it's unsupported.

Do this

Xrm.Page.getControl("WebResource").getObject().contentWindow.[etc. etc.]


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...