locked
Iframe is opening a new window when clicked within the external web page RRS feed

  • Question

  • I have added a new navigation link to the CRM Main Page by modifying the site map and adding a web resource and defining that web resource as an external link within CRM.

    When I click the left nav the external site shows and it is all good. But when I click the links within the external site, the site opens a new windows.

    How can I force the clicks on the external site within the CRM to show the contect within the iframe defined.

    Your help is greatly appreciated.

    Monday, April 1, 2013 4:45 PM

Answers

  • Hi,

    I think that the behavior of links depend the way how they are called. And the IFrame don't influency the default behavior.


    Pedro Azevedo Crm Specialist 4.0\2011

    Monday, April 1, 2013 11:56 PM

All replies

  • I have already tried <BASE target=_self> but still having the same issue.
    Monday, April 1, 2013 4:51 PM
  • Hi,

    Try this:

    window.location.assign(url);
    Hope this helps.
    If i answered your question, please mark the response as an answer and also vote as helpful.


    Pedro Azevedo Crm Specialist 4.0\2011



    Monday, April 1, 2013 4:53 PM
  • Thank you so much Pedro for your quick response. let me explain what I have done:

    I added a link to main page by using the site map (I have not created a new entity for this link) so there is no form properties to get to as follows:

    <SubAreaId="risk_meter"Icon="$webresource:hub_/Images/earth.gif"Title="RiskMeter"Url="$webresource:hub_/Pages/RiskMeter.htm"AvailableOffline="false"/>

    I created a web resource in CRM as HTML and added the following to it:

    <HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>RikeMeter</TITLE><BASE target=_self>

    <META charset=utf-8></HEAD>

    <BODY style="HEIGHT: 800px"><IFRAME height="100%" src="http://www.riskmeter.com/XsiteScripts/hsrun.hse/RiskMeter/RiskMeter/MapXtreme.htx;start=Run_RiskMeterXviaAddress" frameBorder=0 width="100%" scrolling=yes>     

    </IFRAME></BODY></HTML>

    And that's it so far. Now where do I add the line you specified?

    Look forward to hearing from you.

    Thanks so much.

    Monday, April 1, 2013 5:02 PM
  • Hi,

    So you want prevent that a click inside of riskmeter.com open new page, right? In my opinion you can't control that, the code i refer is only if you control the links inside riskmeter.com.

    Hope this helps.
    If i answered your question, please mark the response as an answer and also vote as helpful.


    Pedro Azevedo Crm Specialist 4.0\2011

    Monday, April 1, 2013 5:11 PM
  • Hi Pedro,

    Yes, when I click inside the iframe that is displaying the riskmeter.com in CRM (i.e. the links related to riskmeter.com) I don't want a new window open. I want the new link display in the same iframe. I believe this is possible because I have another link that somebody else did and it is doing exactly as I explained but I cannot figure out how they did it.

    Monday, April 1, 2013 5:18 PM
  • Hi,

    I think that the behavior of links depend the way how they are called. And the IFrame don't influency the default behavior.


    Pedro Azevedo Crm Specialist 4.0\2011

    Monday, April 1, 2013 11:56 PM
  • You are right. I looked at the source code for this web page that I was embedding into the Iframe and with the help of a colleague we noticed that the behaviour comes from the way the web site source code is written (e.g. some times they directed the link to the same page sometimes to a new page on top of CRM, etc.).
    Wednesday, April 3, 2013 5:07 PM
  • Hi,

    Glad it helped. Could you mark one or more of my replies as answer.

    Thanks.


    Pedro Azevedo Crm Specialist 4.0\2011

    Thursday, April 4, 2013 5:37 AM
  • Sure. I just did. Thanks...

    Thursday, April 4, 2013 2:45 PM
  • html5 iframe has new attribute "sandbox" and you can prevent some action in iframe.
    Here you have sandbox property reference:

    http://msdn.microsoft.com/en-us/library/windows/apps/hh441129.aspx

    but its HTML5 attribute and is not supported in Internet Explorer 9 :(

    Thursday, April 4, 2013 9:01 PM
  • Too bad, this is exactly what I was looking for.

    I thought the HTML5 was the latest HTML release and IE9 also the most recent. The published date for the link you provided says 11/28/2012 which is fairly new.

    So why is it not available?

    Thank you very much for your time.

    Friday, April 5, 2013 3:55 PM