Results 1 to 2 of 2

Thread: post and display image

  1. #1
    Join Date
    Nov 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default post and display image

    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

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •