Ok, I am confused.  Here is the jQuery script from the Form Plugin:

    $('#uploadForm').ajaxForm({
        beforeSubmit: function(a,f,o) {
            o.dataType = $('#uploadResponseType')[0].value;
            $('#uploadOutput').html('Submitting...');
        },
        success: function(data) {
            var $out = $('#uploadOutput');
            $out.html('Form success handler received: <strong>' +
typeof data + '</strong>');
            if (typeof data == 'object' && data.nodeType)
                data = elementToString(data.documentElement, true);
            else if (typeof data == 'object')
                data = objToString(data);
            $out.append('<div><pre>'+ data +'</pre></div>');
        }
    });

It seems like alot of it is not needed for me.  All I want to do is
return the HTML response.  Also, is there a way to grab additional
HTML out of the iframe after submit?

On May 12, 9:49 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> Yeah the iframe is the way to go, that's the way the plugin does it.
>
> Karl Rudd
>
> On Tue, May 13, 2008 at 2:23 PM, hubbs <[EMAIL PROTECTED]> wrote:
>
> >  I see.
>
> >  Is there a way that I can still use ajax post, but submit that to an
> >  iframe?  Or is the only way to do it is by using a normal form?
>
> >  On May 12, 8:44 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> >  > You can't actually do file upload via AJAX, it's a security "feature",
> >  > it can be "faked" though.
>
> >  > Try this plugin:
> >  >  http://plugins.jquery.com/project/form
>
> >  > Karl Rudd
>
> > > On Tue, May 13, 2008 at 1:38 PM, hubbs <[EMAIL PROTECTED]> wrote:
>
> >  > >  I have set up a form that uses the $.ajax function using POST.  Part
> >  > >  of my form is an image upload dialog, using the standard file upload
> >  > >  input box.  The problem is, the upload is not working, and I think it
> >  > >  has to do with the encoding.  When I upload it with ajax, it just
> >  > >  sends through the path to the file on my local computer.  But if I use
> >  > >  normal form POST, without ajax, it will send the image contents
> >  > >  through (I can see all the data that was sent, with ajax it is not
> >  > >  there.)  So, what I need to know is, for something like this, so I
> >  > >  need to be encoding that somehow?

Reply via email to