InAppBrowser _blank doesn't allow <input type='file' />

388 views
Skip to first unread message

Jake Johnson

unread,
Feb 26, 2013, 12:02:18 PM2/26/13
to phon...@googlegroups.com
has anyone found a workaround?  If I use InAppBrowser  target = _self, then it works, but I can't get back to my main native page from an external site.

Jake Johnson

unread,
Jun 5, 2013, 9:16:56 PM6/5/13
to phon...@googlegroups.com
Yes, you can get back to the native page from the external site by redirecting to the url of the file on the device.  file://android_assets ...  I can send you the exact source tomorrow when I get in to the office if you don't get it working.


On Wed, Jun 5, 2013 at 10:54 AM, Marcin Mikolajczyk <m4rt...@gmail.com> wrote:
Im also having this issue, anyone knows how to fix that?


W dniu wtorek, 26 lutego 2013 18:02:18 UTC+1 użytkownik Jake Johnson napisał:
has anyone found a workaround?  If I use InAppBrowser  target = _self, then it works, but I can't get back to my main native page from an external site.

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to a topic in the Google Groups "phonegap" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/phonegap/NupiX37jVTg/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to phonegap+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Marcin Mikolajczyk

unread,
Jun 10, 2013, 4:45:39 AM6/10/13
to phon...@googlegroups.com
Could you send the source then?

Jake Johnson

unread,
Jun 10, 2013, 10:09:42 AM6/10/13
to phon...@googlegroups.com

if you put this logic in on your "site" along wiht the cordova include, you will be able to redirect back to native html pages from a site html page.  You will have your base path for the redirect, then you just need to know the exact file name that you are trying to redirect to.

  function onDeviceReadyIOS() { 

            window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFS, null);
        }
        

        function onFS(fs) {          


            iOSFilePath = fs.root.toURL();
            
                pathForNativeRedirect = iOSFilePath.replace("/Documents", "").replace("localhost", "").replace(/ /g, '%20') + '/[your app name].app/www/';
                   
        }

        function onDeviceReadyAndroid() {
            pathForNativeRedirect = 'file:///android_asset/www/';
        }
Reply all
Reply to author
Forward
0 new messages