Ask a questionAsk a question
 

AnswerDynamic IFrame in CRM 3.0

  • Friday, November 06, 2009 2:23 PMvonig Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi,
    I am working with CRM 3.0, and am trying to build the url of an iframe based on data in a crm record (dynamic).

    I am trying to go to a url passing two parameters containing data from the Opportunity record that is open.

    I have the following in my onload event:
    // Load Document URL
    {
    var Docname = crmForm.all.new_Docname.DataValue;
    var Docdesc = crmForm.all.new_Docdesc.DataValue;


    var DOCURL = "http://server:40101/docs Spreadsheet Library/Forms/OpenExcel.aspx?file_url=" + Docname + ".xls&file_desc=" + Docdesc;

    if (DOCURL != null)

       {
          crmForm.all.IFRAME_testing = DOCURL;
       }
    }

    When I click on the tab with the IFrame, I go to the URL defined in the IFrame, not the URL built in the On-Load Event.

    What am I doing wrong?

    Voni

Answers

  • Friday, November 06, 2009 2:30 PMDaniel Cai Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Voni,

    You need to use the Iframe's src property to do that, try the following code:

    crmForm.all.IFRAME_testing.src = DOCURL;

    Cheers,
    Daniel Cai | http://danielcai.blogspot.com
    • Marked As Answer byvonig Friday, November 06, 2009 3:45 PM
    •  

All Replies

  • Friday, November 06, 2009 2:30 PMDaniel Cai Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Voni,

    You need to use the Iframe's src property to do that, try the following code:

    crmForm.all.IFRAME_testing.src = DOCURL;

    Cheers,
    Daniel Cai | http://danielcai.blogspot.com
    • Marked As Answer byvonig Friday, November 06, 2009 3:45 PM
    •  
  • Friday, November 06, 2009 3:47 PMvonig Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Daniel,

    Thank you for responding  :)     ....  I changed that, and a couple other things...and it works perfectly!!!

    Have a great weekend!

    TGIF!

    Voni