user1709061
user1709061

Reputation: 95

Using a Form to Dynamically Change the URL in the Address Bar Part 2

Okay, so I asked a variant of this question before, but I think the thread has died at this point, and I have a followup question:

Using a Form to Dynamically Change the URL in the Address Bar

So, I was looking to find a way to use a form to quickly add a product to a Volusion cart by entering it's product code. Turns out, if you're on the cart page, the solution is this snippet:

<form action="ShoppingCart.asp" name="form" method="get">
<input type="text" value="" name="ProductCode">
<input type="submit" value="Add To Cart">
</form>

Well, this doesn't work at all on other pages...knowing very little about how GET forms work, I'd love to better understand why this is, and what I can do to make this work on, say, the homepage.

The site (currently) is: http://ezndb.cwjea.servertrust.com/

As you can see, I have the red area sporting the code that I used on the check out page, but it doesn't work...any suggestions? I know other threads have suggested javascript/jquery or php methods of getting this to happen...

Upvotes: 1

Views: 164

Answers (2)

user357034
user357034

Reputation: 10981

It doesn't work because your store is a members only site so the customers cannot add items to the cart until they are confirmed members.

Upvotes: 0

Billy
Billy

Reputation: 2448

any form with the method ="get" will append data to the url in name value pairs ( the name being the input name

<form action="#" name="form" method="get">
  <input  name="q" />
  <input name="q2" />
<input type="submit" value ="click and look at the address bar, Probably won't work on stack though" />
  </form>

Upvotes: 1

Related Questions