locked
Webpage in IFrames RRS feed

  • Question

  • Hi ,
    I am having a webpage with 3 fields-a,b,c and a button called Calculate. When i click the button ,the fields a and b will get calculated and result will display on c. The webpage is showing correctly on VS .But when i call the web page in ifames,when i click the calculate button, anew window opens with the updated page. I want to get the same page update din crm iframes itself rather than new page. Can anyone help me to achieve this
    Thanks, Aarch
    Monday, October 19, 2009 9:28 AM

Answers

  • un check the cross site scripting option in the iframe properties and try 
    • Marked as answer by Aarch Friday, October 23, 2009 6:30 AM
    Thursday, October 22, 2009 5:43 AM
  • i faced this similar problem........unchecking the crossite scripting will solve this issue
    • Marked as answer by Aarch Friday, October 23, 2009 6:30 AM
    Friday, October 23, 2009 5:24 AM

All replies

  • Hi, Aarch.

    Try to add to form tag following attribute - target="_self" like:

    <form id="form1" runat="server" target="_self">

    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    Monday, October 19, 2009 9:31 AM
    Moderator
  • it didnt help :-(
    Thanks, Aarch
    Monday, October 19, 2009 12:39 PM
  • Do you youe the CRM-stylesheet in the custom page?
    If that is the case, do you notice any difference if Outlook are running or not?
    Best Regards Jens Egil Evensen
    Monday, October 19, 2009 1:06 PM
  • No am not using CRM stylesheets
    Thanks, Aarch
    Monday, October 19, 2009 1:10 PM
  • Also, you can try to set the window name of the popup in the .aps code. That way you force it to have it self as default target
    In the code under, I set base target like "Select_Product", and then I force the window.name property to be the same.

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProductLookupPage.aspx.cs" Inherits="BusinessPartner.WebPages.CustomWebPages.ProductLookupPage" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="Head1" runat="server">
        <title>Select Product</title>
         <base target="Select_Product" /> 
    </head>
    <script>
    window.name = "Select_Product"; //it's better to include it into window.onload function ;)
    </script>
    <body background="#e3efff">

    Best Regards Jens Egil Evensen
    Monday, October 19, 2009 1:16 PM
  • Hi.

    I've forund the solution, Aarch.

    Check this url . This works fine for me. And remove target property from form tag.
    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    Tuesday, October 20, 2009 8:44 AM
    Moderator
  • Hi a33ik,

    Thanks for the solution. But i got little bit confused.Please correct me if i am wrong. I gave like this in onload
    var newUrl ="http://crm/abc/Default.aspx?&id=" + crmForm.ObjectId + "&type=" + crmForm.ObjectTypeCode;
    window.name="abc";
    crmForm.all.IFRAME_abc.src=newUrl;
    window.open(newUrl, window.name);
    Thanks, Aarch
    Tuesday, October 20, 2009 9:17 AM
  • Hi, Aarch.

    It seems that you try to open one window in IFrame and in new window. Why? Your question subject is Webpage in IFrame. If you want to open page in iframe just left following code:

    var newUrl ="/abc/Default.aspx?&id =" + crmForm.ObjectId + "&type=" + crmForm.ObjectTypeCode;
    crmForm.all.IFRAME_abc.src=newUrl;

    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    Tuesday, October 20, 2009 9:25 AM
    Moderator
  • Hi a33ik,

    In my webpage i am having a button which calculates and shows the updated page. But in CRM Iframes i get the updated page in a new window !! :-( this is my issue
    Thanks, Aarch
    Tuesday, October 20, 2009 9:30 AM
  • Hi,
    help!


    Thanks, Aarch
    Thursday, October 22, 2009 5:11 AM
  • un check the cross site scripting option in the iframe properties and try 
    • Marked as answer by Aarch Friday, October 23, 2009 6:30 AM
    Thursday, October 22, 2009 5:43 AM
  • No unchecking gave me error in my webpage inside iframes when i click tht button
    Thanks, Aarch
    Thursday, October 22, 2009 6:53 AM
  • Hi ,
    will javascript do any help on this? Like accessing the iframe controls using javascript in onload???
    Thanks, Aarch
    Friday, October 23, 2009 4:44 AM
  • i faced this similar problem........unchecking the crossite scripting will solve this issue
    • Marked as answer by Aarch Friday, October 23, 2009 6:30 AM
    Friday, October 23, 2009 5:24 AM
  • I faced the similar problem. Add <base target="_self" /> in the  head tag.

    Santosh Kore CRM Developer
    • Proposed as answer by Santosh Kore Friday, October 23, 2009 5:37 AM
    Friday, October 23, 2009 5:36 AM
  • i tried this before santhosh..it didnt help...

    u faced the same button issue ??
    Thanks, Aarch
    Friday, October 23, 2009 5:44 AM