[ic] Recalculate Problem

Jonathan Clark interchange-users@interchange.redhat.com
Wed May 1 04:44:01 2002


> After much time spent narrowing it down I have found the
> following to be the
> case:
>
> This code in my templates/components/cart file:
>
>
> [button
> 		text="Check Out"
>      	src="navigation/checkout_button.gif"
> 		hidetext=1
> 		form=basket
> 	]
> 	mv_todo=return
> 	mv_nextpage=ord/checkout
> 	[/button]
>
>
> Is normally displayed on the My Cart page as:
>
>
> <script language="javascript1.2">
> <!--
> document.write('<INPUT TYPE=hidden NAME="mv_click_map"
> VALUE="Check_Out"><INPUT TYPE=hidden NAME="mv_click_Check_Out"
> VALUE=""><A
> HREF="javascript:void 0" onMouseOver="window.status=\'Check Out\'"
> 	onClick=" (basket.mv_click_Check_Out.value=\'Check Out\') &&
> basket.submit(); return(false);" 	ALT="Check Out"><IMG
> ALT="Check Out"
> SRC="/~shop/cart/images/navigation/checkout_button.gif" border=0
> align=top></A> ');
> // -->
> </script>
> <noscript><INPUT TYPE="submit" NAME="mv_click" VALUE="Check
> Out"></noscript>
>
>
> Which results in the checkout button being displayed properly.  However,
> whenever I hit recalculate on the My Cart page the following code
> takes the
> place of the above code after it refreshes:
>
>
> <INPUT TYPE="submit" NAME="mv_click" VALUE="Check Out">
>
>
> Which is just a normal forms submit button labeled "Check Out".
> Why does it
> switch the code like that after a recalculate?  The button is displayed
> properly with the initial code at all other times on the My Cart page.
>

Something appears to be breaking in the Javascript on your page. I tried
this on the demo, and a recalculate works fine.

Possibly you have some other javascript on the page which is being broken by
the recalc? The browser is hitting a Javascript error and disabling
scripting which is causing the fallback to the <noscript> code you are
seeing on the page. Have a look at the bottom of the browser window for any
clues.

> Either button clicked leads to the checkout page properly with
> SSL and all.
> Why is all that Javascript even necessary to checkout with a gif
> when that
> short line above checks out the same way with a forms-style button?

Mouseover status bar messages? Not sure..

Jonathan
Webmaint.