Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 143529

Problem with JS execution inside Forms in CRM Online 2016

$
0
0

Hi,

 

What I would like to do is getting the obj reference of an element trought a JS function, the element is inside an Iframe that contains a form.

We are using CRM Online 2016 and we have two environment, Dev and Production:

This is the structure of the page in the Dev env:

-Page

--ContentIframe0

---MyJSfile

So the in MyJSfile I have the following line:

document.getElementsByTagName("tagName")[0].

So for example I will get the obj reference to the header/body/whaterver of the ContentIframe0 and the I will do what I need

 

In Prod this does not work as it works in Dev, and I know why, the script is executed inside a children Iframe (CustomScriptFrame) which prevent my script to be executed in the right element.

This is the structure of the Page in the Prod env:

-Page

--ContentIframe0

---CustomScriptFrame (I don't know where this comes from)

----MyJSfile

So in this case I the same code: document.getElementsByTagName("tagName")[0] will return me the reference to the elements inside CustomScriptFrame but I need to get the elements that are in ContentIframe0.

 

What am I missing ? a Form security setting ?

Where does that CustomScriptFrame comes from and how can I get rid of it ?

 Ty


Viewing all articles
Browse latest Browse all 143529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>