can JS do create gift certificate, redeem certificate and enter promo code

Discussion in 'JavaScript' started by gab0natchi, Jan 15, 2013.

  1. #1
    Hello javascripts experts! I need a "create gift certificate", "redeem certificate" and "enter promo code" options for my website before checkout. Does javascript can do these things? Does anyone know where can I get a tutorial or scripts for these? :)


    Thanks in advance!
     
    gab0natchi, Jan 15, 2013 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    While you can use JS to assist with some of those, really those are things that should have some modicum of security and as such the data/content and processing has NO business being run client-side... and javascript is a client side tech (most of the time).

    What should be used for that sort of thing is a server-side language through normal forms -- PHP, ASP, etc... Once it's working as a normal HTML form submitting to the server, you can bloat out the page with scripting assistance if desired -- but really that's optional extras tossed on as an afterthought (like the majority of scripting should be), NOT how it should be built from the start.
     
    deathshadow, Jan 16, 2013 IP
  3. gab0natchi

    gab0natchi Greenhorn

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    Thanks for the info deathshadow! So you were saying, if I want this option I should hire a PHP programmer? Because I don't know PHP.
     
    gab0natchi, Jan 17, 2013 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #4
    Pretty much yeah. It sounds like you need a form handler -- and even if you did use javascript client side to assist or (boo hiss) supplant the form functionality, you still need SOMETHING on the server to handle/store/communicate what the user typed in.

    ... and that means you need a server side language. Like PHP, or ASP, or coldFusion, or Python, or Perl, or Ruby...

    I just suggest PHP because it has the best online documentation and you're more likely to be able to find meaningful help.
     
    deathshadow, Jan 18, 2013 IP