Results 1 to 1 of 1

Thread: vba xmlhttp post form on a website not working - has array names

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2012
    Posts
    19

    Question vba xmlhttp post form on a website not working - has array names

    Different versions of this code has worked for other posts on the same site (www.cricutmachine.com). Why won't it go to the checkout page as it is written below? I want to get the shipping charge there.

    I think it might be because I am sending wrong or not enough name/value pairs. Also I am not sure if the name/value pairs are entered correctly since the names are parts of arrays. None of the other forms I submitted had array names.

    Code:
    xmlhttp.Open "POST", "http://www.cricutmachine.com/shopping_cart.php?action=update_product", False
    xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    'I think the line below is the problem
    xmlhttp.Send "'cart_quantity[]'=1&'products_id[]'=324"
    Instead of using the code above, can I navigate to the url https://www.cricutmachine.com/checkout_shipping.php and download the html file? I would want to do all that with xmlhttp. I am already logging in and adding the item to the cart with xmlhttp. I don't know if it is possible to navigate directly to a url with xmlhttp because that would not involve submitting a form.
    Last edited by me2me2; May 15th, 2012 at 07:36 PM. Reason: new idea

Tags for this Thread

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