<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CIM: iFrame appearing then disappearing in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-iFrame-appearing-then-disappearing/m-p/17800#M9922</link>
    <description>&lt;P&gt;The only different from the sample code it that the&lt;/P&gt;&lt;PRE&gt;&amp;lt;button onclick="AuthorizeNetPopup.openManagePopup()"&amp;gt;Manage my payment and shipping information&amp;lt;/button&amp;gt;&lt;/PRE&gt;&lt;P&gt;﻿is within a &amp;lt;form /&amp;gt; in your code but it is not in the sample code.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Oct 2011 19:35:37 GMT</pubDate>
    <dc:creator>RaynorC1emen7</dc:creator>
    <dc:date>2011-10-07T19:35:37Z</dc:date>
    <item>
      <title>CIM: iFrame appearing then disappearing</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-iFrame-appearing-then-disappearing/m-p/17718#M9882</link>
      <description>&lt;P&gt;I'm using VS2010 to develop asp.net pages for a customer ordering website.&amp;nbsp; I have included the example code into a test page but cannot get the iFrame to stay on the screen.&amp;nbsp; It appears when I press the "Manage" button but immediately disappears and the page does a postback to the server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I get it to stay displayed to allow the user to see their data?&lt;/P&gt;&lt;P&gt;I have posted my code below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TestPage.aspx.vb" Inherits="WebOrder.TestPage" %&amp;gt;

&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "&lt;A target="_blank" href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&lt;/A&gt;"&amp;gt;

&amp;lt;html xmlns="&lt;A target="_blank" href="http://www.w3.org/1999/xhtml"&gt;http://www.w3.org/1999/xhtml&lt;/A&gt;"&amp;gt;
&amp;lt;head runat="server"&amp;gt;
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
    &amp;lt;link href="contentx/manage.css" rel="stylesheet" type="text/css" /&amp;gt;
    &amp;lt;script type="text/javascript" src="contentx/popup.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;!--[if lte IE 6]&amp;gt;
        &amp;lt;link href="contentx/manageIELTE6.css" rel="stylesheet" type="text/css" /&amp;gt;
    &amp;lt;![endif]--&amp;gt;
    &amp;lt;script type="text/javascript"&amp;gt;
    //&amp;lt;![CDATA[
        // Uncomment this line if eCheck is enabled. This does not affect functionality, only the initial sizing of the popup page for add payment.
        //AuthorizeNetPopup.options.eCheckEnabled = true;

        // Uncomment these lines to define a function that will be called when the popup is closed.
        // For example, you may want to refresh your page and/or call the GetCustomerProfile API method from your server.
        //AuthorizeNetPopup.options.onPopupClosed = function() {
        //	your code here.
        //};

        // Uncomment this line if you do not have absolutely positioned elements on your page that can obstruct the view of the popup.
        // This can speed up the processing of the page slightly.
        //AuthorizeNetPopup.options.skipZIndexCheck = true;

        // Uncomment this line to use test.authorize.net instead of secure.authorize.net.
        AuthorizeNetPopup.options.useTestEnvironment = true;
  //]]&amp;gt;
  &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id="form1" runat="server"&amp;gt;
    &amp;lt;div&amp;gt;
        &amp;lt;button onclick="AuthorizeNetPopup.openManagePopup()"&amp;gt;Manage my payment and shipping information&amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
    &amp;lt;form method="post" action="&lt;A target="_blank" href="https://test.authorize.net/hosted/profile/manage"&gt;https://test.authorize.net/hosted/profile/manage&lt;/A&gt;" id="formAuthorizeNetPopup" name="formAuthorizeNetPopup" target="iframeAuthorizeNet" style="display:none;"&amp;gt;
        &amp;lt;input id="hToken" runat="server"  type="hidden" name="Token" value="6ieEXvWhHWNJ/Uq7dNngFlVmb5uuD+ncZjrN3bWi0QTTxjwNuW/AYFQIFsTpI1coVJYsj2gpiWKkeXzRNGGeP3lg5jUxXdeO9KwpCNjMVKB75+9nbcM4/lKMzDQ+gaJgEnarscZ9lrQAJ8TKKrBnDjTHhbeqOfV6nIb1dJ8O77blV79+uMpmaqTePGCD07YSf+Hu8ZnOgtoY//dkSbpyeuT/nblgK0qchXY8ot8Vo5q1xcxDRMpdkFGeHPAhZsQEfOizdxOirMeMN8bajiI9oTMR1AKQXtAlGhrPQpuDqpfgVw2JQ2N1PNb/pclDNfMcmLAWbFuStTq9pxg8Dl7Zbw==" /&amp;gt;
   &amp;lt;/form&amp;gt;
    &amp;lt;div id="divAuthorizeNetPopup" style="display:none;" class="AuthorizeNetPopupGrayFrameTheme"&amp;gt;
        &amp;lt;div class="AuthorizeNetPopupOuter"&amp;gt;
          &amp;lt;div class="AuthorizeNetPopupTop"&amp;gt;
            &amp;lt;div class="AuthorizeNetPopupClose"&amp;gt;
              &amp;lt;a href="javascript&amp;amp;colon;;" onclick="AuthorizeNetPopup.closePopup();" title="Close"&amp;gt; &amp;lt;/a&amp;gt;
            &amp;lt;/div&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div class="AuthorizeNetPopupInner"&amp;gt;
            &amp;lt;iframe name="iframeAuthorizeNet" id="iframeAuthorizeNet" src="contentx/empty.html" frameborder="0" scrolling="no"&amp;gt;&amp;lt;/iframe&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div class="AuthorizeNetPopupBottom"&amp;gt;
            &amp;lt;div class="AuthorizeNetPopupLogo" title="Powered by Authorize.Net"&amp;gt;&amp;lt;/div&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="AuthorizeNetShadow AuthorizeNetShadowT"&amp;gt;&amp;lt;/div&amp;gt;
        &amp;lt;div class="AuthorizeNetShadow AuthorizeNetShadowR"&amp;gt;&amp;lt;/div&amp;gt;
        &amp;lt;div class="AuthorizeNetShadow AuthorizeNetShadowB"&amp;gt;&amp;lt;/div&amp;gt;
        &amp;lt;div class="AuthorizeNetShadow AuthorizeNetShadowL"&amp;gt;&amp;lt;/div&amp;gt;
        &amp;lt;div class="AuthorizeNetShadow AuthorizeNetShadowTR"&amp;gt;&amp;lt;/div&amp;gt;
        &amp;lt;div class="AuthorizeNetShadow AuthorizeNetShadowBR"&amp;gt;&amp;lt;/div&amp;gt;
        &amp;lt;div class="AuthorizeNetShadow AuthorizeNetShadowBL"&amp;gt;&amp;lt;/div&amp;gt;
        &amp;lt;div class="AuthorizeNetShadow AuthorizeNetShadowTL"&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;    
    &amp;lt;div id="divAuthorizeNetPopupScreen" style="display:none;"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Imports System.Data.OleDb
Imports System.Net
Imports System.IO
Imports System.Xml

Public Class TestPage
    Inherits System.Web.UI.Page
    Dim API_URL = "&lt;A target="_blank" href="https://apitest.authorize.net/xml/v1/request.api"&gt;https://apitest.authorize.net/xml/v1/request.api&lt;/A&gt;"

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If Not IsPostBack Then
            Dim s As String = ""
            Dim asr As New AppSettingsReader
            Dim TranKey As String = asr.GetValue("TranKey", GetType(String))
            Dim APILogin As String = asr.GetValue("APILogin", GetType(String))
            Dim st As String = ""
            Dim ProfileID As String = GetCustomerProfileID("225", Session.SessionID)
            Dim x As String = ""
            Dim xn As XmlNode
            Dim xnl As XmlNodeList
            Dim Token As String = ""

            x = CreateGetHostedProfilePageRequest(ProfileID)
            
            ' send the request to the provider
            s = SendRequestToProvider(x)

            Dim xdoc As New XmlDocument
            xdoc.LoadXml(s)
            xnl = xdoc.GetElementsByTagName("resultCode")
            st = xnl.Item(0).InnerText
            If st = "Ok" Then
                hToken.Value = xdoc.GetElementsByTagName("token").Item(0).InnerText
                'Token = xdoc.GetElementsByTagName("token").Item(0).InnerText
            Else
            End If
        End If
    End Sub
End Class&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2011 14:44:08 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-iFrame-appearing-then-disappearing/m-p/17718#M9882</guid>
      <dc:creator>dartis</dc:creator>
      <dc:date>2011-10-06T14:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: CIM: iFrame appearing then disappearing</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-iFrame-appearing-then-disappearing/m-p/17800#M9922</link>
      <description>&lt;P&gt;The only different from the sample code it that the&lt;/P&gt;&lt;PRE&gt;&amp;lt;button onclick="AuthorizeNetPopup.openManagePopup()"&amp;gt;Manage my payment and shipping information&amp;lt;/button&amp;gt;&lt;/PRE&gt;&lt;P&gt;﻿is within a &amp;lt;form /&amp;gt; in your code but it is not in the sample code.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2011 19:35:37 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-iFrame-appearing-then-disappearing/m-p/17800#M9922</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2011-10-07T19:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: CIM: iFrame appearing then disappearing</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-iFrame-appearing-then-disappearing/m-p/38189#M20907</link>
      <description>&lt;P&gt;The problem is that the button is embeded in another form:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;button onclick="AuthorizeNetPopup.openManagePopup()"&amp;gt;&lt;/PRE&gt;&lt;P&gt;After the onclick action finishes (which uses javascript to submits the formAuthorizeNetPopup&amp;nbsp;form), the button's default action is to submit the form in which it is contained: and submitting that form will cancel submission of the first form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The fix is to add the type="button" attribute and return false from the onclick handler, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;button type="button" onclick="AuthorizeNetPopup.openManagePopup(); return false;"&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See&amp;nbsp;&lt;A href="http://stackoverflow.com/questions/932653/how-to-prevent-buttons-from-submitting-forms" target="_self"&gt;How to prevent buttons from submitting forms&lt;/A&gt;&amp;nbsp;for further details.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2014 22:36:49 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-iFrame-appearing-then-disappearing/m-p/38189#M20907</guid>
      <dc:creator>cwellsx</dc:creator>
      <dc:date>2014-01-06T22:36:49Z</dc:date>
    </item>
  </channel>
</rss>

