SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Nov 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Inform website users about app for website

    I have an android app for my website and I want to inform users who visit the site about it.

    I have seen that :

    http://m.thehindu.com/

    give a very nice option to users who visit the site.

    So far I can identify if the user is accessing the site through an android device using :
    Code:
    if( /Android/i.test(navigator.userAgent) ) {
     var r=confirm("Dwd android app");
    if (r==true)
      {
      alert("You want to dwd app!");
      }
    
    }
    I will then use the setcookie() function to find out if this is the user's first visit and store the response.

    What I require is an option better than the "plain confirm" I am using to ask users if they want to download the app.

    I do not even need a confirm box, I just need to notify a new user that an app is available for the website and give the option of download or skip.

  2. #2
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,384
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Look into Javascript popups and modal screens.
    Steve Husting

  3. #3
    SitePoint Member
    Join Date
    Nov 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by StevenHu View Post
    Look into Javascript popups and modal screens.
    Thank you for the reply.

    Is there a specific jquery you have in mind that throws a window to cover up the entire screen space, remembers the response of the user and is customizable?

    I tried the openmodal jquery but could not get it to work!!

  4. #4
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,880
    Mentioned
    48 Post(s)
    Tagged
    0 Thread(s)
    jquery popups should be a simple task to implement. Should just be a matter of including the .js and css file after the jquery reference. Then it should work. If not you can post your error messages in the javascript thread and the guys there should be able to help you get it working.

    That being said, I have seen a lot of sites just do it with a simple javascript alert() message. And it works fine. So it is up to you how you approach it, but there is no need to get really fancy, but would not hurt if you did.

  5. #5
    SitePoint Member
    Join Date
    Nov 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you for the reply, I will test out some other things and let you guys know if there is any problem.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •