hi Yılmaz
thanks for the reply..
I followed your (good) advice with some change. This is what i did:

1- deleted the  url:' option  from ajaxFileUpload function, so my php
file is called rightly once;
2- when i call the jquery $.ajax function i clone the input created
from the $.ajaxFileUpload into my form
3- all my data are sent to the php script

and that's perfect but..using jquery apparently i cannot specify that
i have a $_FILES['myInputFile'] into the data option (If i get as
$_POST it's ok).
I specified processData as false between the  $.ajax optoin but with
no use.

any idea why?
Vitto



 deleted

On Feb 21, 10:39 am, "Yılmaz Uğurlu" <[EMAIL PROTECTED]> wrote:
> I am using this plugin just like that.
> <form ...>
>
> ... my other form elements
>
> <p>
>   <label for="fileToUpload">Choose File :</label>
>   <input id="fileToUpload" type="file" name="fileToUpload" />
>   <input type="button" id="upload_btn" value="Upload!"
> onclick="ajaxFileUpload();" />
> </p>
>
> ... other elements,  my form is huge :)
> </form>
>
> ajaxFileUpload() does not need to be posting your form. It's already
> creating iframe and posting file over this element. So, you can use like
> this, i am using with no problem.
>
> 2008/2/20, hcvitto <[EMAIL PROTECTED]>:
>
>
>
>
>
> > hi
> > i'm using the ajaxfileupload plugin from this site
> >http://www.phpletter.com/Our-Projects/AjaxFileUpload/(which works
> > great) in a form with different kind of input file. The form is
> > "ajaxed" through the $.ajax jquery function. Following the form
> > submitting is a mail with the data from the form.
>
> > Problem: i use the '$.ajax' and the '$.ajaxFileUpload' on the same
> > form which calls for the same php file, which is now called twice,
> > once per function. So everytime i submit the form two mails are sent,
> > one with the data the other with the file attached.
>
> > How can i integrate the ajaxfileupload in my form? anyone does know
> > this plugin?
>
> > Thanks Vitto
>
> > this is my form submit ajax function:
>
> > $.ajax({
> >         type: "POST",
> >         url: "curriculumInvio.php",
> >         data: myData,
> >         success: function(){
> >                                 myFunction
> >                         }
> >                 });
>
> > this is the plugin ajax function:
>
> > $.ajaxFileUpload({
> >         url:'curriculumInvio.php',
> >         secureuri:false,
> >         fileElementId:'fileToUpload',
> >         dataType: 'json',
> >         success: function (data, status){
> >                                       plugin stuff,
> >                                         }
> >                         });
>
> --
> Yılmaz Uğurlu ~ jabber : [EMAIL PROTECTED]  ~http://www.2nci.com~ İzmir

Reply via email to