How to change parameters to PHP call

  • Thread starter Thread starter John
  • Start date Start date
J

John

I'm using a PHP shopping cart and have the following problem.

Using a DWT, I have 3 Frames.
1) Frame one has buttons for color selection. Each button has an "onclick"
behavior defined.
2) Frame two displays the color selected from Frame 1.
3) Frame three has my "Add to Cart" button.

I would like the parameters to my PHP "Add to Cart" button to change
according to the selection made in Frame 1.

For example, when the Yellow button is pressed, the parameters are:
<a href="/cart.php?action=add&id=0001&descr=Yellow&price=4&quantity=1"><img
src="/cart/add_cart.gif"></a>and when the Blue button is pressed, the
parameters are:<a
href="/cart.php?action=add&id=0001&descr=Blue&price=2&quantity=1"><img
src="/cart/add_cart.gif"></a>
Is this possible?

Thanks,
John
 
FYI,

I was able to resolve this with a javascript
getElementById('Anchor').href="/choice.php?action=add&id=0001&descr=Blue"
call.

I knew it could be done, it just took a while to figure out. :)

John
 
FYI,

I was able to resolve this with a javascript
getElementById('Anchor').href="/choice.php?action=add&id=0001&descr=Blue"
call.

I knew it could be done, it just took a while to figure out. :)

John
 
Back
Top