RE: [PHP] Re: uploading files... necessary Ajax?

This is a discussion on RE: [PHP] Re: uploading files... necessary Ajax? within the PHP General forums, part of the PHP Programming Forums category; [snip] So that I can get my head around this, are all of you saying there is no Ajax equivalent ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-21-2007
Jay Blanchard
 
Posts: n/a
Default RE: [PHP] Re: uploading files... necessary Ajax?

[snip]
So that I can get my head around this, are all of you saying there is
no Ajax equivalent of:

<form action="index.php" enctype="multipart/form-data" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="2048000" >
<input name="userfile" type="file">
<input type="hidden" name="stage" value="1">
<input type="submit" value="submit">

We can't in some way use the ajax post method to send the file in the
background without a refresh (other than using iframe) is that
correct? Or am I completely missing something here?
[/snip]

That is correct. Without an IFRAME you cannot upload a file without a
refresh.
Reply With Quote
  #2 (permalink)  
Old 11-21-2007
Jay Blanchard
 
Posts: n/a
Default RE: [PHP] Re: uploading files... necessary Ajax?

[snip]
That is correct. Without an IFRAME you cannot upload a file without a
refresh.
[/snip]

Take Two. You could also open another window, but that kinda defeats the
purpose.
Reply With Quote
  #3 (permalink)  
Old 11-21-2007
Jochem Maas
 
Posts: n/a
Default Re: [PHP] Re: uploading files... necessary Ajax?

Jay Blanchard wrote:
> [snip]
> So that I can get my head around this, are all of you saying there is
> no Ajax equivalent of:
>
> <form action="index.php" enctype="multipart/form-data" method="post">
> <input type="hidden" name="MAX_FILE_SIZE" value="2048000" >
> <input name="userfile" type="file">
> <input type="hidden" name="stage" value="1">
> <input type="submit" value="submit">
>
> We can't in some way use the ajax post method to send the file in the
> background without a refresh (other than using iframe) is that
> correct? Or am I completely missing something here?
> [/snip]
>
> That is correct. Without an IFRAME you cannot upload a file without a
> refresh.


huh? if I post a file to a script that returns a 204 status and nothing else then
the page should not change in the browser.

of course as Colin pointed out this leaves much to be desired in terms of usability
so for practical purposes you'll want to use an Iframe hack or upload widget built
with java or flash.

>

Reply With Quote
  #4 (permalink)  
Old 11-21-2007
Jay Blanchard
 
Posts: n/a
Default RE: [PHP] Re: uploading files... necessary Ajax?

[snip]
huh? if I post a file to a script that returns a 204 status and nothing
else then the page should not change in the browser.
[/snip]

True, the missing piece is that the post cannot move the file up to the
server.
Reply With Quote
  #5 (permalink)  
Old 11-21-2007
Jochem Maas
 
Posts: n/a
Default Re: [PHP] Re: uploading files... necessary Ajax?

Jay Blanchard wrote:
> [snip]
> huh? if I post a file to a script that returns a 204 status and nothing
> else then the page should not change in the browser.
> [/snip]
>
> True, the missing piece is that the post cannot move the file up to the
> server.


I was referring to a standard POST not using AJAX.

>

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:18 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0