[jQuery] Re: Encoding image upload through ajax POST

2008-05-15 Thread hubbs
For some reason, the script is returning an entire page for the data part, am I able to just return a div? On May 14, 5:28 pm, Karl Rudd [EMAIL PROTECTED] wrote: If you know your response is always going to be HTML then you could use something like this: $('#uploadForm').ajaxForm({        

[jQuery] Re: Encoding image upload through ajax POST

2008-05-15 Thread Karl Rudd
Errr sure. In your server side code just return the div rather than a whole page. You could add an argument such as ajax=true to the form post URL. If you really don't want to change your server side code you could strip the page wrapping from the whole page you get back. (Untested code

[jQuery] Re: Encoding image upload through ajax POST

2008-05-14 Thread hubbs
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)

[jQuery] Re: Encoding image upload through ajax POST

2008-05-14 Thread Mike Alsup
If you know your response is always going to be HTML then you could use something like this: $('#uploadForm').ajaxForm({ success: function(data) { $('#uploadOutput').append( data ); } }); The data argument in the success function is what holds the response.

[jQuery] Re: Encoding image upload through ajax POST

2008-05-14 Thread hubbs
I am needing to pass quite a few other options. Since it is submitting into an iframe, would the normal form POST happen here? Or do I need to pass the value of those field into a var, and pass those? On May 14, 5:33 pm, Mike Alsup [EMAIL PROTECTED] wrote: If you know your response is always

[jQuery] Re: Encoding image upload through ajax POST

2008-05-14 Thread Mike Alsup
I am needing to pass quite a few other options. Since it is submitting into an iframe, would the normal form POST happen here? Or do I need to pass the value of those field into a var, and pass those? You really don't need to be concerned with the iframe, the plugin handles everything for

[jQuery] Re: Encoding image upload through ajax POST

2008-05-14 Thread hubbs
Ok guys, I appreciate all the help! I have just one more thing. I am using the following script: script type=text/javascript $(document).ready(function(){ $('#page_asset_builder_20248').ajaxForm({ success: function(data) { $('#uploadOutput').append( data ); }

[jQuery] Re: Encoding image upload through ajax POST

2008-05-13 Thread Quinode
On 13 mai, 05:44, Karl Rudd [EMAIL PROTECTED] wrote: You can't actually do file upload via AJAX, it's a security feature, it can be faked though. this plugin works too : http://www.phpletter.com/Demo/AjaxFileUpload-Demo/

[jQuery] Re: Encoding image upload through ajax POST

2008-05-13 Thread hubbs
So, do these plugins actually create the iframe for me? What do I have to do to get it to submit it into the iframe? I how do I specify which script processes the post into the iframe? On May 13, 1:50 am, Quinode [EMAIL PROTECTED] wrote: On 13 mai, 05:44, Karl Rudd [EMAIL PROTECTED] wrote:

[jQuery] Re: Encoding image upload through ajax POST

2008-05-13 Thread Karl Rudd
I can only speak for the plugin I recommended, the Form Plugin. I think the documentation (http://malsup.com/jquery/form/) covers most of this, but I'll try and answer your questions here: So, do these plugins actually create the iframe for me? Yes. What do I have to do to get it to submit

[jQuery] Re: Encoding image upload through ajax POST

2008-05-12 Thread Karl Rudd
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.

[jQuery] Re: Encoding image upload through ajax POST

2008-05-12 Thread hubbs
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

[jQuery] Re: Encoding image upload through ajax POST

2008-05-12 Thread Karl Rudd
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?