View Full Version : post and display image

11-02-2008, 08:42 AM
how can i upload,display and save image using javascript
and once i create a form in html then how can we access the inputs given by users such that when they post they will be displayed on webpage in a particular format using javascript only:confused:

11-02-2008, 01:31 PM
Javascript can't save images, and has no access to post data. AJAX, which involves the server may or may not be able to do this (it can access the post in at least some ways, though some servers won't allow it to - as for saving an image, I just don't know), but if you have a server side language like PHP, asp, etc. and are changing the page or reloading it anyway, use your server side language.

Javascript can access get data though, by getting information from the location object. However, post data is hidden from the user while get is in the address bar for all to see (can be a security risk and looks ugly/can be limited as to the amount and kinds of data), and javascript isn't always enabled, so you are still better off using a server side language. This also impacts the idea of using AJAX, which though it accesses the server, requires javascript.