Harry
Harry

Reputation: 13329

Failed to load webpage with error: Frame load interrupted

I see this has been asked before but I dont see any solutions:

So Im using Cordova 2.5 to build an iPad app on iOS 6.1.2

My app.coffee:

jQuery ->
    class window.AppRouter extends Backbone.Router
        routes: {
            '': 'index',
            ':parent/:child/': 'childView',
            ':id/': 'detailView',
        },

        index: =>
            $("#navbar .title").text("Flight Centre's Choices")
            view = new fc.main.View
            view.render()

        childView: (parent, child) =>
            view = new fc.main.View(parent:parent, child:child)
            view.render()

        detailView: (id) =>
            view = new fc.main.Detail(id:id)
            view.render()

    window.app = new AppRouter();
    Backbone.history.start();

The first index view loads successfully and displays as it should

Now clicking on one of the links to lets say open childView, it fails to load the page:

2013-03-20 16:56:13.684 Flight[1158:907] Resetting plugins due to page load.
2013-03-20 16:56:13.689 Flight[1158:907] Resetting plugins due to page load.
2013-03-20 16:56:13.694 Flight[1158:907] Failed to load webpage with error: Frame load interrupted

the link the user clicks on looks like this':

/#/foo/bar/

Everything works as expected in Chrome browser on my mac.

I dont know whats happening here!!

Upvotes: 13

Views: 10764

Answers (2)

Simon Hoss
Simon Hoss

Reputation: 562

I could solve it by using window.location.hash

Upvotes: 0

Harry
Harry

Reputation: 13329

Damn this waisted allot of time, the answer was so dumb and simple.

Rather than having the links in the html as :

/#/foo/bar/

It should just be

#/foo/bar/

this makes sense, with the leading / the page will reload, and thats why I got that error.

Hope it helps someone

Upvotes: 35

Related Questions