Welcome Guest, Not a member yet? Register   Sign In
AJAX Response
#1

[eluser]NateL[/eluser]
I'm working on a small feature which uploads images using AJAX.

User clicks browse, chooses image, and the image begins uploading.

Inside my controller, I have a class called upload with a do_upload function, which on a typical upload, will forward you to an "upload success page".

Since i'm using AJAX, I have used the console.log feature - console.log(response);

and that logs my success page. I can actually see this data that gets logged:

Code:
<h3>File uploaded!</h3>
        <ul>
            &lt;?php foreach($upload_data as $item => $value):?&gt;
                <li>&lt;?=$item;?&gt;: &lt;?=$value;?&gt;</li>
            &lt;? endforeach;?&gt;
        </ul>

It shows me all of the file information - but I need to grab the file name that was just uploaded and display it (rather than logging it)

Sorry if this is a tad confusing Smile


Messages In This Thread
AJAX Response - by El Forum - 02-21-2009, 09:12 PM
AJAX Response - by El Forum - 02-21-2009, 10:06 PM
AJAX Response - by El Forum - 02-21-2009, 10:25 PM
AJAX Response - by El Forum - 02-21-2009, 10:59 PM
AJAX Response - by El Forum - 02-23-2009, 09:50 PM
AJAX Response - by El Forum - 02-24-2009, 05:51 AM
AJAX Response - by El Forum - 02-24-2009, 09:10 AM
AJAX Response - by El Forum - 02-24-2009, 12:22 PM
AJAX Response - by El Forum - 02-24-2009, 12:46 PM
AJAX Response - by El Forum - 02-24-2009, 12:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB