locked
Change the Source of IFrame in CRM 2013 to display another page ASPX RRS feed

  • Question

  • I can't change th source of IFrame in CRM 2013 with JavaScript code 

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

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

    don't work


    wassim profile

    Thursday, November 14, 2013 3:43 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:32 PM
    Thursday, November 21, 2013 9:31 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()
    {
       var modelEnqueteSatisfaction = Xrm.Page.getAttribute("hli_modelenqutesatisfaction");                  
                IFrame.setSrc("http://msdn.microsoft.com/fr-fr/");
    }

    function Form_onLoad() {

    setInterval("Frame_change()", 1000);

    }


    wassim profile

    Thursday, November 21, 2013 9:27 PM
  • 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()
    {
       var modelEnqueteSatisfaction = Xrm.Page.getAttribute("hli_modelenqutesatisfaction");                  
                IFrame.setSrc("http://msdn.microsoft.com/fr-fr/");
    }

    function Form_onLoad() {

    setInterval("Frame_change()", 1000);

    }


    wassim profile



    wassim profile

    Thursday, November 21, 2013 9:28 PM
  • 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:32 PM
    Thursday, November 21, 2013 9:31 PM