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!
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.
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.
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.