SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Mar 2010
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    List Box with dynamic submit button

    What I am trying to do is add a list box to my site that when the user clicks on a certain item and presses submit the correct code gets sent to my cgi cart.

    any ideas on how i can accomplish this?

    cheers,

  2. #2
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    I wish I knew what you meant by "list box". Do you mean a <select> element?

    This made the most sense to me, in which case, those belong in forms and the form should submit, as they are want to do.

    As someone who shops with Javascript disabled, this is preferable anyway. You can always use Javascript to remove other form elements to clean up the form a bit for those who have JS enabled.

    You can also have JS add "submit buttons" which, when clicked, use AJAX to ask the server to update that little section of the cart, and let users who have no JS just fill everything in at once and hit the real submit at the bottom. Those users would just get a whole page refresh like normal.

    Could you be more descriptive?

  3. #3
    SitePoint Member
    Join Date
    Mar 2010
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK. so what I have is a list box or drop down menu.

    This is for a single product with multiple quantities. Once a quantity is selected and they hit submit, I am trying to get that variable to my cart.

    I am having trouble figuring out how to add in all of my item numbers and send them to the cart successfully, upon selection.

    cheers,

  4. #4
    SitePoint Member
    Join Date
    Mar 2010
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nevermind i got it. thank you for the help.


Bookmarks

Posting Permissions

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