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

Join 136,866 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,644 people online right now. Registration is fast and FREE... Join Now!




ComboBox/button

 
Reply to this topicStart new topic

ComboBox/button

KingsOnly
3 Aug, 2008 - 02: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
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/3/08 07:38PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month