This is a migrated thread and some comments may be shown as answers.

[Solved] Child Browser problem

3 Answers 60 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
fan
Top achievements
Rank 1
fan asked on 27 Nov 2012, 03:04 AM
Hi,

I am trying the Child Browser plugin in Icenium,

The error is 
"Failed to load resource  http://local/Plugins/Child%20Browser/childbrowser.js"

i am think it is caused by the "space" in the path? But I can't rename this file.

Anyone has some advice to solve it? 

thank you in advance



3 Answers, 1 is accepted

Sort by
0
fan
Top achievements
Rank 1
answered on 27 Nov 2012, 03:40 AM
This is my code:

<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta charset="utf-8" />
        
        <script src="cordova.js"></script>
        <script src="kendo/js/jquery.min.js"></script>
        <script src="kendo/js/kendo.mobile.min.js"></script>
        <script src="http://maps.google.com/maps/api/js?sensor=true"></script>
        <script src="scripts/hello-world.js"></script>
        <script src="Plugins/Child Browser/childbrowser.js"></script>

        <link href="kendo/styles/kendo.mobile.all.min.css" rel="stylesheet" />
        <link href="styles/main.css" rel="stylesheet" />
    </head>
    <body>
        <div data-role="view" id="tabstrip-home" data-title="Hello World!">
            <h1>Welcome!</h1>
            <p>
                Icenium&trade; enables you to build cross-platform device applications regardless of your 
                development platform by combining the convenience of a local development toolset with the 
                power and flexibility of the cloud.
            </p>
            <button onclick="openGoogle">Open Google</button>
            
        </div>

        <div data-role="view" id="tabstrip-uiinteraction" data-title="UI Interaction">
            <h1>Say Hello!</h1>
            <div id='helloWorldInput'>
                <label for="txtName" style="display: inline-block;">Enter your name:</label>
                <input type="text" id="txtName" value="" />
            </div>
            <div id='helloWorldText' style="display:block;"></div>
            <div class="buttonArea">
                <a id="resetButton" data-role="button" data-click="sayHelloReset" data-icon="refresh">Reset</a>
                <a id="submitButton" data-role="button" data-click="sayHello" data-icon="compose">Submit</a>
            </div>
        </div>

        <div data-role="view" id="tabstrip-geolocation" data-title="Geolocation">
            <h1>My Location</h1>
            <div id="geoLocationContainer">
                <div id="myLocation">Unable to get location information. Please check your network connection and try again.</div>
                <a id="refreshMap" data-role="button" data-click="getLocation" data-icon="refresh">Refresh Location</a>
                <div id="map_canvas"></div>
            </div>
        </div>

        <div data-role="layout" data-id="mobile-tabstrip">
            <header data-role="header">
                <div data-role="navbar">
                    <span data-role="view-title"></span>
                </div>
            </header>

            <div data-role="footer">
                <div data-role="tabstrip">
                    <a href="#tabstrip-home" data-icon="home">Home</a>
                    <a href="#tabstrip-uiinteraction" data-icon="share">UI Interaction</a>
                    <a href="#tabstrip-geolocation" data-icon="globe">Geolocation</a>
                </div>
            </div>
        </div>

         <div data-role="layout" data-id="mobile-tabstrip" data-platform="android">
            <div data-role="footer">
                <div data-role="tabstrip">
                    <a href="#tabstrip-home" data-icon="home">Home</a>
                    <a href="#tabstrip-uiinteraction" data-icon="share">UI Interaction</a>
                    <a href="#tabstrip-geolocation" data-icon="globe">Geolocation</a>
                </div>
            </div>
        </div> 

        <script>
            var app = new kendo.mobile.Application(document.body, { transition: "slide", layout: "mobile-tabstrip" });
            function openGoogle(){
    var root = this;
    cb = window.plugins.childBrowser;
    
    if(cb != null) {
       cb.showWebPage("http://google.com");
    }else
       alert("childbrowser is null");
    
}
        </script>
    </body>
</html>


Thanks again1
0
Ivan Ivanov
Telerik team
answered on 27 Nov 2012, 04:20 PM
Hi there,

Everything looks fine. You just need to make that little change:

Replace this line:
<button onclick="openGoogle">Open Google</button>
with this:
<button onclick="openGoogle()">Open Google</button>

Bear in mind that childbrowser plugin is currently not supported in the Simulator and Ion. You should deploy your application on device.

In addition you could check this links: 
 - Childbrowser demo: https://github.com/Icenium/sample-childbrowser.git
 - Working with plugins:  here

If you have any further questions, please do not hesitate to contact us.

Greetings,
Ivan Ivanov
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
0
fan
Top achievements
Rank 1
answered on 29 Nov 2012, 10:06 AM
Hi, Ivan,

Thank you for your clear answer and help!

Hope it can be worked on simulation soon
Tags
General Discussion
Asked by
fan
Top achievements
Rank 1
Answers by
fan
Top achievements
Rank 1
Ivan Ivanov
Telerik team
Share this question
or