views:

55

answers:

1

Whenever I add my webapp to the home screen and click on a link, it takes the user out of the web app and into Safari. The link is a home button, it takes the user back to the home page. The home page works fine, but it only leaves the app when I click the home button. The web app works fine on my Mac. Here is the code:

<a href="<?php echo"Home.php?name=$name";?>">Go Home</a>

Is something wrong with the php? I need the php so the query string will work. Thanks for the help.

+1  A: 

Webapps need to be fully ajaxified. You cannot perform regular page reloads. I highly recommend a mighty JavaScript framework like jQuery, which simplifies the use of ajax and the required DOM-manipulation a lot.

EDIT: You can fetch a remote url using jQuery's highlevel $.get-method like this:

$.get('Home.php', {
    // query parameters
    'name': 'some-name'
}, function(data) {
    // data now contains the fetched page
});

Take a look at the jQuery Ajax API for further information If you never used jQuery before, you should look into some tutorials.

elusive
Could you please provide a bit of sample code?
Preston
@Preston: Check out my edit.
elusive