A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: hidden form fields on buttons ?

  1. #1
    Junior Member
    Join Date
    Jun 2004
    Posts
    3

    hidden form fields on buttons ?

    Hi,
    sorry if this has already been asked , but i've been wading through forums all day and don't seem to be getting anywhere.

    I am using MX

    I am redesigning a site i made in html into flash. The site has a shop section and for this I have used romancart http://www.romancart.com.

    I basically want to convert this html code which works fine in the html page and use it on a flash button.

    form action=http://www.romancart.com/cart.asp
    input type=hidden name=itemname value='Jakeone - "Rascal EP"'
    input type=hidden name=price value=5.00
    input type=hidden name=storeid value=00000
    input type=hidden name=quantity value=1
    input type=hidden name=shipping1 value=1.80
    input type=hidden name=shipping2 value=2.50
    input type=hidden name=shipping3 value=3.75

    input name="submit" type=submit value='Add'



    the storeid is the reference number for the shop as everything is handled by romancarts software on their servers, the other values are obviously price ect.

    I have tried various things in flash
    this is what i've got so far

    on the button which is in the root of the movie i have put this actionscript.

    on (release) {
    getURL("http://www.romancart.com/cart.asp", _blank, "POST");
    set(storeid, "00000");
    set(itemname, "Jakeone-Rascal EP");
    set(price, "5.00");
    set(quantity, "1");
    set(Shipping1, "1.80");
    set(Shipping2, "2.50");
    set(Shipping3, "3.75");
    }

    I have also tried placing the code inside the button and have tried declaring the variables first i.e

    var storeid; ect

    I have been looking into components but have never done anything like this before and keep running into walls.

    any help would be much appreciated
    Thanks
    tec1

    p.s. i have asked romancart support an searched through all their help files but they haven't come up with a solution.









  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    At least you should define the variables before you try to send them:
    code:

    on (release) {
    // variables here
    getURL("http://www.romancart.com/cart.asp", _blank, "POST");
    }



    And when you use set() you need quotes:
    code:

    set("x", 5); // not set(x, 5);
    trace(x);


    Or simply:
    code:

    x = 5;


  3. #3
    Junior Member
    Join Date
    Jun 2004
    Posts
    3
    YOUR A STAR !

    thanks very much it's working now.



  4. #4
    Junior Member
    Join Date
    Sep 2002
    Posts
    1

    Yes!!

    Yes! A big thank you from me as well. You really helped me out.

    Thanks a ton,
    Dann

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center