SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Back Button Issue

    I have a site that dynamically loads a "Back" button for a mobile site. The link to view the page is below....

    LINK-
    http://www.tocdocs.com/mobile/

    The issue is that the "Back" button disappears when certain situations arise. One example is when a web visitor navigates away from the Home page with the main menu; lets say they click on the "Our Doctors" button; and then for what ever reason they would Refresh their web browser or smart phone. In that scenario, the "Back" button disappears and will not become visible.

    Now if you are able to edit the URL in the browsers address bar, you can remove the string of text including the pound sign/hash and the characters after it and then load the page and the "Back" button reappears.

    Is there a fix so that the "Back" button will remain visible at ALL times? I appreciate all help and I thank you in advance!

    Todd
    Todd Temple > T2 Design

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    The key to all this is to use JS only as an enhancement. At the moment, with JS off, the site is a blank white screen.

  3. #3
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ultimately, this page would be viewed only on a mobile device. And I am not sure if smart phone users have the ability to diable JavaScript.... do they?
    Todd Temple > T2 Design

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Todd Temple View Post
    I am not sure if smart phone users have the ability to diable JavaScript...
    All users do, but only smart users know how to. (joke)

    Seriously, though, it is quite easy to turn off JS on an iPhone, but whether many people do is another question, so I probably shouldn't have mentioned it. Still, I guess this situation is an example of where hard-coding has an advantage.

  5. #5
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I guess that was my goal; to find an answer on how to hard-code the back button. Any clues?
    Todd Temple > T2 Design

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Hm, I guess for the menu section you could hard code a link back to the top of the document (i.e. original landing page), such as

    <a href="#top">Back</a>

    and on the doctor pages, hard code a link back to the menu, such as

    <a href="#menu">Back</a>

    but you'd have to put new IDs at the top of the doc and on the menu.

  7. #7
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Todd Temple View Post
    I guess that was my goal; to find an answer on how to hard-code the back button. Any clues?
    What is wrong with the built-in back button that comes with all web browsers?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


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
  •