Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Upload File without refreshing actual pg

Upload File without refreshing actual pg

Scheduled Pinned Locked Moved Web Development
questionjavascripthtmlalgorithmshelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    Hi. I'm a beginner, so may be you'll find this question easy to answer. I'm trying to upload a file from a web page with an tag, and I want to submit it without refreshing the actual page. I'm working with two frames: the visible one and a hidden one (not visible) with which I've been trying to send the form included in the visible one with javascript/DOM, but when I get the name of the file to upload I can't clone the input object to the not visible frame and send the form from the hidden frame (I think this is due to the impossibility to copy the path of the input tag to the hidden frame). Could any one help me, please? I've been searching the web, but I found no example (may be because it's too obvious for someone with a minimum experience). Thanks in advance.

    T 1 Reply Last reply
    0
    • A Anonymous

      Hi. I'm a beginner, so may be you'll find this question easy to answer. I'm trying to upload a file from a web page with an tag, and I want to submit it without refreshing the actual page. I'm working with two frames: the visible one and a hidden one (not visible) with which I've been trying to send the form included in the visible one with javascript/DOM, but when I get the name of the file to upload I can't clone the input object to the not visible frame and send the form from the hidden frame (I think this is due to the impossibility to copy the path of the input tag to the hidden frame). Could any one help me, please? I've been searching the web, but I found no example (may be because it's too obvious for someone with a minimum experience). Thanks in advance.

      T Offline
      T Offline
      The Limey
      wrote on last edited by
      #2

      There is one possibility I can think of to stop the page refreshing. When a request is made to a server a status code is returned whether it be 200 (OK) or 404 (Not Found) by default, otherwise the Internet would not work. There is however a status code which does not return which is 204. On the client side submit a page as normal. On the server side page do what you have to do with the the request and finally return a staus code of 204. The page will not move. He who laughs last thinks slowest.

      A 1 Reply Last reply
      0
      • T The Limey

        There is one possibility I can think of to stop the page refreshing. When a request is made to a server a status code is returned whether it be 200 (OK) or 404 (Not Found) by default, otherwise the Internet would not work. There is however a status code which does not return which is 204. On the client side submit a page as normal. On the server side page do what you have to do with the the request and finally return a staus code of 204. The page will not move. He who laughs last thinks slowest.

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        Thanks for such an easy way to do things work!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups