0

I have a phonegap + jquery mobile app. I have a login page and the form action go on my server. After the validation I have to come back on the app page. What's the link of my app? How can i go back?

Thanks for the support

Oniz
  • 403
  • 1
  • 5
  • 7

1 Answers1

0

Long story short: I guess your app index page is at file://www/index.html

Long story long:

I'm not fully familiar with phonegap, but I assume you want to return to your phonegap page inside your app, right?

why not print out using javascript the window.location on this page? Something like:

alert(window.location);

and in order to perform the redirect after the login (in the server), you can either use some javascript in the result page to change window.location or send out a redirect in the headers with something like this (in case you're using php for your serverside):

<?php
header('Location: PUT-URL-HERE');
?>

also this question: PhoneGap Relative URL shows some internal urls inside a phonegap app

Community
  • 1
  • 1
talkol
  • 12,564
  • 11
  • 54
  • 64
  • I solved my problem using ajax. The path that I get with "window.location" it's the path from the iPhone root and not the app root. Thanks anyway for the answer – Oniz Dec 07 '11 at 09:26