mugetsu
mugetsu

Reputation: 4398

phonegap page redirect not working, property 'location' of object is not a function

I'm trying to do a simple page redirect in phonegap with js. This code is called from within an iframe, so I'm doing:

window.parent.location("event_select.html");

but this doesn't work, and I get the error:

uncaught typerror: property location of object(DOM window) is not a function.

what am I doing wrong?

Upvotes: 1

Views: 2782

Answers (1)

Simon MacDonald
Simon MacDonald

Reputation: 23273

location is not a function it is an object. I believe you want to do a:

window.parent.location.href="event_select.html";

Upvotes: 2

Related Questions