locked
Change the Source of IFrame in CRM 2013 RRS feed

  • Question

  • Hi,

    I will change th source of IFrame in CRM 2013 with the same JavaScript code form CRM 2011, but it can't work and i don't see any change in the Frame

     var IFrame = Xrm.Page.ui.controls.get("IFRAME_Test");

    IFrame.setSrc("http://msdn.microsoft.com/fr-fr/");

    any one can help?

    I need a help and thank's for any one,

    Thursday, November 14, 2013 2:46 PM

Answers

  • In Onload function we can not change the SetSrc for a frame , we can use the setInterval function to change the source after loading all component of the page

    function Frame_change()
    {              
          IFrame.setSrc("http://msdn.microsoft.com/fr-fr/");    
    }

    function Form_onLoad() 
    {
    setInterval("Frame_change()", 1000);
    }


    wassim profile

    • Marked as answer by wassim abbassi Thursday, November 21, 2013 9:33 PM
    Thursday, November 21, 2013 9:33 PM

All replies

  • In Onload function we can not change the SetSrc for a frame , we can use the setInterval function to change the source after loading all component of the page

    function Frame_change()
    {              
          IFrame.setSrc("http://msdn.microsoft.com/fr-fr/");    
    }

    function Form_onLoad() 
    {
    setInterval("Frame_change()", 1000);
    }


    wassim profile

    • Marked as answer by wassim abbassi Thursday, November 21, 2013 9:33 PM
    Thursday, November 21, 2013 9:33 PM
  • Hi,

    We have an Iframe on a record and we are showing some other record in this Iframe by setting the URL of the record.But the issue here is, Iframe is always showing the main record on which this Iframe is placed.Can you please provide a solution for this?

    We are using MS CRM 2013 on-premise for this.

    Thanks and Regards,

    Mahi

    Friday, February 7, 2014 10:19 AM