tags:

views:

702

answers:

5

Hi I would like to know if there is any other way using javascript or something to enter the user input directly to database without using POST method.

A: 

Yes using the GET method. Over HTTP those are your choices.

zodeus
Also a PUT method. Or DELETE method. Though only POST and PUT make any sense semantically.
Chuck
+1  A: 

There are several HTTP commands:

GET POST PUT DELETE HEAD CONNECT TRACE

The only ones that will do what you want according to the specification are PUT and POST.

You shouldn't use GET to send data back to the server for storage. So if you don't want to use POST, use PUT.

RibaldEddie
A: 

If the page is being viewed from a machine that has access to the database, then you can ask javascript to create an instance of the ADO activex objects (anone remember those? mebe I'm showing my age) and then your js code can talk direct to the database. Again, this only works for machines that can hit the db directly (local machine/network).

Boo
you have to be running IE to use activeX
Bob The Janitor
Wow, how very astute Bob. Perhapse you shouldn't quit your day job just yet.
Boo
+3  A: 

If the result that you want is for the javascript itself to connect to the database and run the queries, then I believe the answer is no. However, this is something you would never ever want to do because it means the user would have full access to the database.

OverloadUT
+1  A: 

whats wrong with with using an Ajax call using jQuiery, prototype, or dojo.

An other option is to use flash or silverlight and call a web service

Bob The Janitor