cancel
Showing results for 
Search instead for 
Did you mean: 

Hosted Popup CIM payment/shipping editor

Ok: Trying to do Hosted CIM popup for editing payment info...

 

VS 2010 C# Web Application in .Net 4.0

Running in localhost IIS application or on testing server

My page loads and has no errors.

I set EnableViewStateMac="false"ValidateRequest="false" is set in  <%@ Page

 

JavaScript does NOT seem for button clicks to anyting like do AuthorizeNetPopup.openEditPaymentPopup( [payid] ); - the page actually reloads from the server instead of staying client only,

 

If I unhide the divAuthorizeNetPopup, the iFrame loads empty.php

the buttons are defined like:

       

<buttononclick="editPayment();">Edit Payment Method</button>

 

int he page header, in the script tag :

 

       

function editPayment() {

           var payCntrl = document.getElementById('PaymentProfileId');

           var payid = payCntrl.value;

           AuthorizeNetPopup.openEditPaymentPopup(payid);

        }

 

the iframe (which is in <divid = "divAuthorizeNetPopup") :

 

class="AuthorizeNetPopupSimpleTheme">

       

<divclass="AuthorizeNetPopupOuter">

<iframename="iframeAuthorizeNet"id="iframeAuthorizeNet"src="authorize/popup/empty.html"

               

frameborder="0"scrolling="no"></iframe>

 

Note above that src to iFrame is in sub directories authorize/popup/

The css & script files match:

   

<linkhref="authorize/popup/paymentShipping.css"rel="stylesheet"type="text/css"/>

   

<scriptsrc="authorize/popup/popup.js"type="text/javascript"></script>

 

The values for the token and id's were loaded correctly:

   

<formmethod="post"action=""id="formAuthorizeNetPopup"style="display: none;"target="iframeAuthorizeNet">

       

<inputname="Token"type="hidden"id="Token"value="QI+0WHdnnZi9l4T3ZP2ljdhi7bAnzHL+WACJq2CGZsTxDf3aMDPSAkWsks6q9GuzQlvOKAOrVsAkewCnwUdJ9puPpkCZrNe9Wj5hwaf2to3Rk/gifKRNhaclQ+s8Ieo+5zBBNPSXBLnKqEA3HR9/e0pEU14gslGaf1sL21Lkvphgh4QwrpsJm5uQe8ZsEu2ossheVYcjUtlkg9YWYR1EiBwt1OCAT+4GcDoG+00BKJ6lasP1yELK2BNtuyXx504N4jFFvzxkFpbF0UwFHJjej7xILZ8/1FJDvw42gU84EQ1lfbzMD2RqKlawedtTdZ21/6dm8CEnBOscPpFpHqBUViz9sP92QKv+zj7kSB1UeiFRxNu4RdE42aumb0AFPtcj84DVpnFmGeNrQaeQ0eb9IKTvPPKbx7Em8CJp26g+jtw="/>

       

<inputname="PaymentProfileId"type="hidden"id="PaymentProfileId"value="17922494"/>

       

<inputname="ShippingAddressId"type="hidden"id="ShippingAddressId"value="18086377"/>

 

 

 

So...

 

I've followed each step.

I can't get the hosted CIM popup to work for any ADN call like

AuthorizeNetPopup.openEditShippingPopup(shipid);

 

Any help approciated.

rachmann
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

I had a few problems with page load order. All is fine. Sorry I didn't close this out sooner.

View solution in original post

2 REPLIES 2

If you going to use the popup.js without any mod on a asp.net.

You need to change it ClientIDMode to static

http://msdn.microsoft.com/en-us/library/system.web.ui.control.clientid%28v=vs.100%29.aspx

 

YOu don't need a <button /> for a javascript onclick, just create a <div /> or an <image /> that way, you are sure it will not call the server.

 

If you are using IE, have you use the  F12 Developer tool to see the error on the console?

 

 

 

 

RaynorC1emen7
Expert

I had a few problems with page load order. All is fine. Sorry I didn't close this out sooner.