Results 1 to 3 of 3

Thread: [RESOLVED] Can JavaScript validate & verify code entered by customer in my site?

  1. #1
    Join Date
    Nov 2009

    resolved [RESOLVED] Can JavaScript validate & verify code entered by customer in my site?

    Hi there

    Is it possible to create a JavaScript that can validate the form and check against the code secretly kept on the server? If the customer enters the correct code, I want the script to take them to the paypal page to pay the discounted amount. If they enter incorrect code, I want the script to redirect them back to the "enter code" page.

    On my site, existing customers can purchase other services on a discount. I have displayed two prices: for example 199 for existing customers and 249 for new customers.

    Those who are existing customers, they will click and go the next page where they will see a text link that says:

    Click to enter verification code & pay discounted price.

    When they click the link, an HTML form will ask the user to enter a verification code. This is the code they have received in an email when they previously bought a package from us.

    Can a script do the job in a secured manner?

    Many Thanks.


  2. #2
    Join Date
    Dec 2003
    Bucharest, ROMANIA
    Better use a server-side code for that. Javascript is a client-side language, it was not meant to perform a user/password job nor any kind of. The client-side code can not be hidden, it is to be seen by the user, if he wants to. There are methods to encrypt somehow the javascript code, but, logically, if someone can see the encrypted code, sooner or later he will be able to decipher it.

    And if you are dealing with money: not even think of.
    Last edited by Kor; 11-16-2009 at 10:57 AM.

  3. #3
    Join Date
    Nov 2009

    resolved Resolved

    Dear Kor

    It is do with money and now that you have convinced me to look for server side coding like PHP etc, I will look into it.

    I'd like to take this opportunity to thank you for resolving this little challenge of mine. Imagine me using JavaScript for password checking...lol that would have been something.

    Kind Regards


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center