[ic] Modifying posted form with mv_click

Jamie Neil interchange-users@icdevgroup.org
Mon Apr 28 07:20:00 2003


Hi,

Does anyone know if there is a way of modifying a form field when it is
posted using an mv_click block?

The reason I ask is that I am trying to create a "Remove" button for my
basket using the [button] tag.

I know this can be done using pure javascript to update the [quantity-name]
field onclick, but this has a couple of drawbacks. First it is obviously not
good for noscript browsers, but another issue I am having is that it causes
a problem if the customer uses the back button. If they click through to the
checkout from the basket, and then click back in the browser, if they then
click on the remove button for an item it will remove the item but the
refresh will display the checkout page rather than the basket (you can
confirm this behavoir in the IC 4.9 Demo). I think it is because mv_nextpage
is being set by the checkout page and then not being overridden by going
back in the browser.

Using a button tag seems to fix this because it can set the mv_nextpage
explicitly. But I can't add an onclick action to the button (using the extra
option) to clear the quantity field without breaking the button. I also
don't want to rely on JavaScript - it seems cleaner to me to do the item
removal in the mv_click.

Suggestions?

Jamie Neil
Versado I.T. Services Ltd.
Tel: +44 (0)1702 525348
Mobile: +44 (0)7970 132709
Mailto:jamie@versado.net