Ok,

First off
>       form.ValidateCC.value = <@var
>local$Payment[xxxxxxxxxxxxxxxxxxxxx,CC_Validate]>;
This will not work due to the fact that Witango already tried to put a
value in as it was serving up the page. The value need to be passed
through JS

You need a NAME= in the <FORM to name the object for JS to reference
So let's try this

<script language="javascript">
<!--
function CopyInfo(ccvalue)
{
        CCVAL.ValidateCC.value = ccvalue;
}
// -->
</script>

<form name="CCVAL" method="post" action="<@VAR domain$CGI><@VAR
domain$RootPath>Order/Shipping.taf?_function=input&<@UserReferenceArgume
nt>"

---then add this to the end of the @choicelist
SELECTEXTRAS='onClick="CopyInfo(this.options[this.selectedIndex].value)"
'

Disclaimer: this has not been tested

Should get you on the right track

Ben Johansen - http://www.pcforge.com
Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm 
Authorized MDaemon Mail Server Reseller
http://www.pcforge.com/AltN.htm


-----Original Message-----
From: Fogelson, Steve [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2003 12:21 PM
To: Witango User Group (E-mail)
Subject: Witango-Talk:

I have the following code to select a payment method. With each payment
record is a field indicating whether to validate the credit card or not.
The
name of the field is CC_Validate in the array local$Payment. I was
hoping to
set form.ValidateCC.value equal to CC_Validate in the row selected in
the
<@choicelist> tag (indicated by xxxxxxxxxxxxxxxxxxxxxxxxxxx). 

Can't figure it out. It will save me a search action if I can get this
to
work.

Thanks

Steve Fogelson
Internet Commerce Solutions


<script language="javascript">
<!--
function CopyInfo(form)
{
        form.ValidateCC.value = <@var
local$Payment[xxxxxxxxxxxxxxxxxxxxx,CC_Validate]>;
}
// -->
</script>

<form method="post" action="<@VAR domain$CGI><@VAR
domain$RootPath>Order/Shipping.taf?_function=input&<@UserReferenceArgume
nt>"
onSubmit="CopyInfo(this)">

<@choicelist name="PaymentMethod" type=select options="<@var
local$Payment[*,CC_Name]>" values="<@var local$Payment[*,CC_ID]>"
size="1"
selected="<@var user$ArgPaymentMethod>">

<input type="hidden" name="ValidateCC">

</form>
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to