southbeach
Programmer
OK, you cannot upload files using AJAX but you can mimic the process by targeting an iframe when submitting the form - and that is what I am doing.
Writing a script where user will setup a catalog of products. Everything I've done for this site is AJAX based and so I would like to keep this form same as others, hence why I am mimicking the AJAX behavior.
I had a form with two input fields each type file. I am using onchange() event to submit the form and load the image. This works fine except that I was getting an error on FF browser and this made me feel uncomfortable. I then decided to split the form in two and have two forms ... now it does not work at all.
The forms submit but when checking for $_FILES['myfile'], it is not set thus rendering the code useless.
Each form is using a unique name and I am checking for each of these names to process the file to be uploaded. Each form submits to a different iframe and I can see messages I output.
Why would $_FILES['myfile'] be blank?
Thank you all in advance for your assistance!
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
Writing a script where user will setup a catalog of products. Everything I've done for this site is AJAX based and so I would like to keep this form same as others, hence why I am mimicking the AJAX behavior.
I had a form with two input fields each type file. I am using onchange() event to submit the form and load the image. This works fine except that I was getting an error on FF browser and this made me feel uncomfortable. I then decided to split the form in two and have two forms ... now it does not work at all.
The forms submit but when checking for $_FILES['myfile'], it is not set thus rendering the code useless.
Each form is using a unique name and I am checking for each of these names to process the file to be uploaded. Each form submits to a different iframe and I can see messages I output.
Why would $_FILES['myfile'] be blank?
Thank you all in advance for your assistance!
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.