Back Button or Link

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • FluxForums

    Back Button or Link

    <a href="" onclick="histor y.go(-1); return false;">Your Image or Tex
    Link</a
    --
    FluxForum
    -----------------------------------------------------------------------
    FluxForums's Profile: http://www.fluxforums.com/member.php...etinfo&userid=
    View this thread: http://www.fluxforums.com/showthread.php?threadid=16

  • Richard Cornford

    #2
    Re: Back Button or Link

    FluxForums <28956017a91f23 7033d0e2d28101d c93@news.terane ws.com> wrote:[color=blue]
    ><a href="" onclick="histor y.go(-1); return false;">Your Image or Text
    >Link</a>[/color]

    Apart form the obvious failure to verify the existence of the history
    object and its - go - method in the execution environment of this
    script, a recurring (and unsolvable) problem with "back" button scripts
    is that they cannot know whether there is a history to go back into. If
    the page was opened in a new window or tab, accessed as a home page or
    from a desktop link then there is no preceding URL and the code cannot
    do anything.

    The browser knows these details and greys out the back button (and
    context menu entry) when there is no history. Attempting to reproduce
    normal browser behaviour with a script places a considerable onus on the
    script author to do as good a job as the browser would have. There is no
    point re-inventing a wheel if it is going to be square.

    Having realised that the control should be evidently disabled whenever
    there is no history to go back into, it should also be clear that the
    control should be evidently disabled or missing whenever the browser in
    use does not support scripting at all.

    <snip>[color=blue]
    >FluxForums's Profile: http://www.fluxforums.com/...[/color]
    <snip>

    As you appear to have some connection with this web site, you should
    maybe consider how wise it is to drop unsuspecting users of your site
    (potentially clients by the look of some of the other services offered)
    into Usenet newsgroups without even warning them where they are posting
    to. Usenet is not something that you can take advantage of without any
    consequences. The potential for generating negative publicity alone can
    be considerable. If you want to see how it works go to groups.google.c om
    and search alt.html, alt,html.critiq ue,
    comp.infosystem s.www.authoring.stylesheets and comp.lang.javas cript for
    "forum4designer s" and see what potential troubles you are inviting.

    Richard.


    Comment

    Working...