Add to Home Screen Web App

Whenever I add my webapp to the main screen and click on the link, it brings the user out of the web application and in Safari. The link is the home button; it returns the user to the home page. The home page works fine, but when you press the home button, it leaves the application. The web application works fine on my Mac. Here is the code:

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

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

+3
source share
2 answers

As I did on my standalone web application:

<a href="javascript:(window.location='Home.php?name=<?php echo($name)?>')">Go Home</a>

, - JQTouch, JQueryMobile Sencha. , Safari:)

+3

Webapps ajaxified. . JavaScript, ​​ jQuery, ajax DOM-.

EDIT: url, jQuery highlevel $.get -method :

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

jQuery Ajax API jQuery , tutorials.

+1

Source: https://habr.com/ru/post/1766492/


All Articles