[FX.php List] JQuery and posting image-upload forms
Steve Winter
steve at bluecrocodile.co.nz
Thu Aug 18 09:33:53 MDT 2011
And that would work as Bob wants it to, and upload the file... hence why I was asking him if there was some particular reason he wanted to use Ajax ;-)
Cheers
Steve
> I'm sure I am misunderstanding, but I use Javascript to submit forms all the time using the simple Javascript statement:
>
> document.YourFormName.submit();
>
>
>
>
> David Allen Ness
> Database Systems Administrator
> Web Applications Developer
>
>
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Bob Patin
> Sent: Thursday, August 18, 2011 11:13 AM
> To: FX.php Discussion List
> Subject: Re: [FX.php List] JQuery and posting image-upload forms
>
> Well, I'm not sure what to call it, but I'm using JQuery to submit a form. I'm using actual FORM tags...
>
> So my form has the enctype set to "multipart/form-data"; my JQuery looks like this:
>
> <script type="text/javascript">
> $(document).ready(function(){
> // submit form
> $('#form1').submit(function() {
>
> var folder_var = $('#folder').val();
> var filename_var = $('#filename').val();
> var userid_var = $('#userid').val();
>
> // POST the form
> $('#status').html('Uploading file...');
> $.post(
> // URL
> 'upload2.php',
> // DATA
> {
> folder: folder_var,
> filename: filename_var ,
> userid: userid_var
>
> so... upload2.php is the page that does the uploading. I've run this page by itself, and it does process just fine, but not using this above...
>
> Any thoughts?
>
> thanks,
>
> Bob
> bob at patin.com
>
>
>
>
>
> On Aug 18, 2011, at 9:03 AM, Steve Winter wrote:
>
>> What do you mean by 'jQuery form-processing method'...? do you mean you're trying to use jQuery and AJAX to submit a form...? if that's the case, then no, it won't work...
>>
>> If all you're using jQuery to do is to submit a standard form, then it should work fine...??
>>
>> Cheers
>> Steve
>>
>>> Anyone used JQuery in conjunction with a form that uploads files?
>>>
>>> I've tested the upload page and its associated processing page, and both work fine; however, when I embed the upload page with JQuery, and then try to use JQuery to trigger the form-process, it fails.
>>>
>>> I'm wondering if the JQuery form-processing method will work with forms that are dealing with files?
>>>
>>> Thanks for any help,
>>>
>>> Bob Patin
>>> Longterm Solutions LLC
>>> bob at longtermsolutions.com
>>> 615-333-6858
>>> http://www.longtermsolutions.com
>>> FileMaker 9, 10 & 11 Certified Developer Member of FileMaker Business
>>> Alliance and FileMaker TechNet
>>> --
>>> Twitter: bobpatin
>>> Google+: http://www.longtermsolutions.com/plus
>>> AIM: longterm1954
>>> iChat: bobpatin
>>> --
>>> Expert FileMaker Consulting
>>> FileMaker Hosting for all versions of FileMaker
>>>
>>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
Steve Winter
+44 777 852 4776
steve at bluecrocodile.co.nz
More information about the FX.php_List
mailing list