/    Sign up×
Community /Pin to ProfileBookmark

My Transaction Form doesn’t work

Hi Guys,

I am trying to debugging for my donation form (my web programmer just quit).The issue that I am having is when people submit a credit card donation, an email form with all the person information is encrypted and emailed to us here to process. Somehow! the form make a mess.The last number digit in 4 credit card donations submitted is missing!

I have been trying debugging by my self for few hours but somehow, I didn’t find any clue

My codes:

[QUOTE]

<script type=”text/javascript” src=”../js/js.js”></script>
<!– InstanceBeginEditable name=”head” –>
<script language=Javascript><!– Hide this
function validate(donate)
{
var v_name=donate.fullname.value;
var v_address=donate.Address.value;
var v_city=donate.City.value;
var v_province=donate.Province.value;
var v_postalcode=donate.PostalCode.value;
var v_email=donate.email.value;
var v_cemail=donate.confirm_email.value;

var v_phone=donate.Phone.value;
var v_other=donate.donation_b.value;

var v_number=donate.elements[32].value;

var v_date=donate.elements[33].value;

var v_cardtype=donate.CreditCard.value;

if(v_name ==””){
alert(‘Please enter your Name.’);
document.donate.fullname.focus();
return false;
}

if(v_address ==””){
alert(‘Please enter your Address.’);
document.donate.Address.focus();
return false;
}
if(v_city ==””){
alert(‘Please enter your City.’);
document.donate.City.focus();
return false;
}
if(v_province ==””){
alert(‘Please enter your Province.’);
document.donate.Province.focus();
return false;
}
if(v_postalcode ==””){
alert(‘Please enter your Postal Code.’);
document.donate.PostalCode.focus();
return false;
}
if(v_phone ==””){
alert(‘Please enter your Phone Number.’);
document.donate.Phone.focus();
return false;
}
if(v_email ==””){
alert(‘Please enter your Email Address.’);
document.donate.email.focus();
return false;
}
if(v_email!=v_cemail){
alert(‘Your email addresses do not match. Please confirm your Email Address.’);
document.donate.confirm_email.focus();
return false;
}

if(donate.amount[0].checked == “” && donate.amount[1].checked == “” && donate.amount[2].checked == “” && donate.amount[3].checked == “” && donate.amount[4].checked == “” && donate.amount[5].checked == “” && donate.amount[6].checked == “” && v_other==””){
alert(‘Please enter a Donation Amount.’);
document.donate.amount[0].focus();
return false;

}

if(donate.CreditCard[0].checked == “” && donate.CreditCard[1].checked == “”){
alert(‘Please enter your Credit Card Type.’);
document.donate.CreditCard[0].focus();
return false;
}

if(v_number ==””){
alert(‘Please enter your Credit Card Number.’);
document.donate.elements[32].focus();
return false;
}
if(v_date ==””){
alert(‘Please enter your Credit Card Expiry Date.’);
document.donate.elements[33].focus();
return false;
}

if(donate.YesNo[0].checked == “” && donate.YesNo[1].checked == “”){
alert(‘Please enter if you would like a Tax Receipt.’);
document.donate.YesNo[0].focus();
return false;
}
}

//stop hiding–>
</script>
<!– InstanceEndEditable –>

[/QUOTE]

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@mrhooJan 09.2007 — An email is sent to you?

You need a new programmer.

The problem is going to be in the form handler file named in the form's [B]action[/B] attribute, not the javascript- all the script does is make sure the required fields are filled in before sending the name-value pairs from the form to the server.
Copy linkTweet thisAlerts:
@Arch_AngelauthorJan 10.2007 — An email is sent to you?

You need a new programmer.

The problem is going to be in the form handler file named in the form's [B]action[/B] attribute, not the javascript- all the script does is make sure the required fields are filled in before sending the name-value pairs from the form to the server.[/QUOTE]


Hi mrhoo, thanks for the reply ?

That's really help me!

Thats why I wondering why they said that the Javascript the one having a problem and its been awhile for handling some web scripting. It takes time to find the right programmer ?

this the form handler codes.

If you find the problem faster than me, please do tell me ?



<form name="donate" onsubmit="return validate(donate);" action="https://www.xxx.xx/cgi-bin/mail_bc.pgp?bc.donate" method="post">

<input type="hidden" value="[email protected]" name="ignore:pgp-to">

<input type="hidden" value="bc.xxx" name="ignore:recipient">

<input type="hidden" value="x,y" name="ignorefields">

<input type="hidden" value="http://www.xx.xxx.xx/donate/donate_thanks.html" name="ignore:next-url">

<input type="hidden" value="Lung Association Donation Form" name="subject">

<input type="hidden" name="replymsg" value="mail_bc_reply.txt">

<input type="hidden" name="replyfrom" value="[email protected]">
[/quote]
Copy linkTweet thisAlerts:
@Arch_AngelauthorJan 10.2007 — uff anyone can help me please?

I even bring this coding this to home.
×

Success!

Help @Arch_Angel spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...