Welcome to Dream.In.Code
Click Here
Getting Help is Easy!

Join 118,587 Programmers for FREE! Ask your question and get quick answers from experts. There are 814 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



ComboBox/button

 
Reply to this topicStart new topic

ComboBox/button

KingsOnly
post 3 Aug, 2008 - 03:44 PM
Post #1


New D.I.C Head

*
Joined: 3 Aug, 2008
Posts: 1

Here is the code I want to use with a the shopping cart. I input this code and I get directed to paypals home page instead of a cart. I'm not sure what I doing wrong because I am new to this.

var aColors:Array = ["red", "yellow", "green", "black", "grey", "blue"];
clrs_cmb.dataProvider = aColors;
var aSizes:Array = [35, 36, 37, 38, 39, 40];
sizes_cmb.dataProvider = aSizes;
go_btn.onRelease = function() {
var cmd:String = "_cart";
var strAdd:String = "1";
var business:String = "payment@kingsonly.com";
var item_name:String = "LB-100";
var amount:String = "25.00";
var shipping:String = "5.99";
var shipping2:String = "2.99";
var currency_code:String = "USD";
var bn:String = "PP-ShopCartBF";
var strcolor:String = clrs_cmb.selectedItem;
var size:String = sizes_cmb.selectedItem;
trace(strcolor+" "+size);
getURL("https://www.paypal.com/cgi-bin/webscr", "_blank", "POST");
};


This code works for a button which gets directed to our paypal account:

on (release){
var paypalObj = new Object();
paypalObj['add'] = 1
paypalObj.cmd = '_cart';
paypalObj.business = 'payment@kingsonly.com';
paypalObj.item_name = 'City Wear';
paypalObj.item_number = 'LB-100';
paypalObj.amount = '25.00';
paypalObj.no_shipping = '0';
paypalObj.shipping = '';
paypalObj.tax = '';

paypalOBJ.undefined_quantity ='1'
paypalObj.no_note = '1';
paypalObj.currency_code = 'USD';
paypalObj.lc = 'US';
paypalObj.bn = 'PP-ShopCartBF';
paypalObj.target_winName = 'paypal';
paypalObj.shopping_url = ('http://www.kingsonly.com');
var sUrl = 'https://www.paypal.com/cgi-bin/webscr?'
for (var o in paypalObj)
sUrl += o + '=' + paypalObj[o] + '&';
trace(sUrl);
getURL(sUrl,'paypal','POST');
}

How can I incorporate either or to have this feature work
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/11/08 07:24PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month