Giter VIP home page Giter VIP logo

Comments (12)

sebalagos90 avatar sebalagos90 commented on July 30, 2024

Hi @cwkerk.
The "Show" method only accepts 4 parameters like this:
webview.Show(YOUR_URL [string], SUCCESS_FUNCTION [function], ERROR_FUNCTION [function], SHOULD_SHOW_LOADING [boolean]);

Best regards!

from cl.kunder.webview.

cwkerk avatar cwkerk commented on July 30, 2024

Thank you for reply.
However, after I change into "browseWebView.Show("https://angularjs.org",function(){alert("WebView Success");}, function(){alert("WebView Failure");}, true);", it still not working

from cl.kunder.webview.

cwkerk avatar cwkerk commented on July 30, 2024

I wonder why the following code doesn't work:

mainApp.browseWeb = function(address){
if(navigator.connection.type != Connection.NONE){
var browseWebView = new webview();
browseWebView.Show(address, function(){alert("WebView Success");}, function(){alert("WebView Failure");}, true);
alert('The web view is created');
}
else alert('Browse error : No network connection');
}

from cl.kunder.webview.

sebalagos90 avatar sebalagos90 commented on July 30, 2024

What operating system did you try your code?
The mainApp.browseWeb is called in your code?

from cl.kunder.webview.

cwkerk avatar cwkerk commented on July 30, 2024

iphone 6s plus.
May I know is this plugin work for all ios version?

from cl.kunder.webview.

sebalagos90 avatar sebalagos90 commented on July 30, 2024

We use it daily and we don't have issues.
Please let me check it out

from cl.kunder.webview.

cwkerk avatar cwkerk commented on July 30, 2024

May I have our example code for this plugin?
Just for reference, maybe I may find the bug with that help.

from cl.kunder.webview.

sebalagos90 avatar sebalagos90 commented on July 30, 2024

I did create a new ionic project and wrote the following code:
$scope.click = function(){
document.addEventListener('deviceready', function(){
webview.Show('http://www.google.cl', function(){alert("WebView Success");}, function(){alert("WebView Failure");}, true);
}, false);
};
With or without device ready event works fine.

from cl.kunder.webview.

cwkerk avatar cwkerk commented on July 30, 2024

I see.
I wonder if this plugin only works with ionic framework?
I didn't use it since it is quite heavy to build app in my macbook.

from cl.kunder.webview.

arturokunder avatar arturokunder commented on July 30, 2024

@cwkerk
It should work with any framework.
If you checkout the js code, you can see that there isnt references to any framework.

Maybe your problem is your are constructing a webview object, but webview class only has static methods

Look at @sebalagos90 code. It uses webview.Show() directly.
But in your code:

var browseWebView = new webview();  
browseWebView.Show(address, function(){alert("WebView Success");}, function(){alert("WebView Failure");}, true);

from cl.kunder.webview.

cwkerk avatar cwkerk commented on July 30, 2024

By the way, how can I make multiple webviews using this plugin?

from cl.kunder.webview.

arturokunder avatar arturokunder commented on July 30, 2024

@cwkerk you can make multiple webviews on iOS but not in Android
In order to make it work on Android, you will need to change the code a little because there are some static variables as described in #3

from cl.kunder.webview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.