/    Sign up×
Community /Pin to ProfileBookmark

Javascript and Form Processing

I am new to both javascript and the concept of CGI, so I am unclear on something:

Can pure javascript be used to simply submit a form as an e-mail, or does any sending of information have to be done with CGI on the server? Can javascript only be used to make forms validate or interact with the user?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@PittimannMar 07.2005 — Hi!

Pure javascript, literally taken, can not even be used to simply submit a form as an e-mail. An email client has to be available on the user's machine.

For processing submitted data, you can use one of many different server side languages, not only CGI. Concerning forms (and other stuff), js can be very useful. You can make a client side validation of your forms to avoid unnecessary server hits, if required fields have not been filled the way you want. But you should always add server side validation to avoid being fooled.

With js you can enhance websites in many ways but if you need data to be read or written, the server side way is the one to go.

Cheers - Pit
×

Success!

Help @tarsus 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 6.16,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...