Welcome Guest, Not a member yet? Register   Sign In
Behaviuor of controller not clear
#1

[eluser]GabrieleMartino[/eluser]
Hello,

my question is about the beahviuor of controller when called. I take two different call, a download_controller and a upload_controller.

If we are in the download side i can not call the load of views and it remain in the page.
Wheras if i use upload class it moves in another page.

Is there a method to avoid the call of views when uploads and stay in same page? thanks
#2

[eluser]TheFuzzy0ne[/eluser]
Yes, but it might not be as straight forward as you hoped.

When you upload a file, you're making a new request, and when the server responds, the browser will take the appropriate action depending on how the server responded. The server could instruct the browser to redirect, or send it a new view to render, but there's no way to tell the browser not to attempt to refresh the page.

The only way I know of to get around this, is to use an uploader. There are quite a few around. I like [url="http://www.uploadify.com/"]Uploadify[/url]. It uses Javascript and Flash. It's also possible to do it with just javascript or even with a Java applet.
#3

[eluser]boltsabre[/eluser]
I'd stay away from anything that uses flash or java just for the simple matter that many users don't have this running on their systems, thus making your uploader useless. And the number of devices that don't have these softwares seems to be on the increase.

You can do it with iFrames and ajax, without page refreshes... I did one last year. It's a fair bit of mucking around, but I found it a fun little project!
#4

[eluser]TheFuzzy0ne[/eluser]
HTML5 supports AJAX file uploading without the need for iFrames, but you can't depend on user's having Javascript enabled.

As far as I'm aware, Facebook uses Javascript and Flash, and just about everyone I know uses Facebook. Also youtube has a lot of users, and they use Flash.

So long as your solution degrades gracefully, it shouldn't matter what you use.




Theme © iAndrew 2016 - Forum software by © MyBB