FABridge on shopping cart checkout
I’m working with a team to put together a repeatable checkout process.
We are using a Flex shopping cart and then opening up an IFrame using flexiframe to capitalize on our ASP.net secure checkout server. This works like a charm until we click on a simple button in ASP.net that does one thing - and one thing only. It’s supposed to trigger a process, using FABridge, to get us back to the first ‘page’ in the Flex application so as to run another transaction.A few things I have done, and please let me know if you need more data, code, or whatever.
I put FABridge.js in the Flex project’s html-template folder. I put FABridge.as in the a ‘bridge’ package in the Flex project.
I put FABridge.js in the ASP.net project. I declare this file on the aspx page like so:
<script type="text/javascript" src="../Scripts/FABridge.js"></script>
Then, I declared the ASP.net button like so:
<asp:Button runat="server" ID="btnNewOrder" Text="Place New Order" OnClientClick="newOrder();"/>
The newOrder function is written like so:
function newOrder() { var flexApp = FABridge('AdminTrak', 'flex'); flexApp.setPage(0); }The setPage function in Flex looks like so:
public function setPage(pageNum:int):void {
model.pageSetter(pageNum, 2)
}
Now, I added a namespace on the view where this function resides like so:
xmlns:bridge="bridge.*" as well as the following declarat开发者_如何学Cion:
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<bridge:FABridge bridgeName="flex" />
</fx:Declarations>
Also, I added the following line in my index.template.html file:
flashvars.bridgeName = "flex";
So, I run a transaction and then click on the button to place a new order. All I get is an error that tells me that FABridge.flex is not defined.
Please help.
精彩评论