July 22, 200818 yr I have a form that is going to be used to take credit card details, when the submit button is clicked, a javascript checks the the credit card information, the then the form action is used to process the cgi script that saves the form data on my server. The problem im having is that the form action is being processed whether the card details are correct or not, i need the form action to only go through if the details are correct. I was thinking of deleting the action from the form, and replacing the "alert("This card number appears to be valid.");" string of the javascript with the form action, however im clueless with javascript and dont know what write here. Any ideas? Thanks in advance
Create an account or sign in to comment