• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "javascript links you can't right-click on. Why?"

Collapse

  • Sysman
    replied
    Originally posted by d000hg View Post
    Or more likely, it's working but it's not designed at all - some developer threw it together without thinking because "everyone uses javascript".
    And the developer probably hasn't heard of accessibility.

    Leave a comment:


  • Zippy
    replied
    Originally posted by VectraMan View Post
    What if it doesn't always link to the same place?
    Then you should build the page dynamically on the server.

    Leave a comment:


  • d000hg
    replied
    Originally posted by Freamon View Post
    It's working as designed.
    Or more likely, it's working but it's not designed at all - some developer threw it together without thinking because "everyone uses javascript".

    Leave a comment:


  • VectraMan
    replied
    Originally posted by Bunk View Post
    It's poor practice but you still see it a lot. The href attribute of the link should be the URL of the page it links to. Any additional functionality should be added to the event handler for clicking on the link. That way if a user has javascript disabled then they will still be able to click on the link and reach the intended page. This is known as progressive enhancement.
    What if it doesn't always link to the same place?

    Leave a comment:


  • Freamon
    replied
    It's working as designed.

    Leave a comment:


  • NickFitz
    replied
    Why? Rank incompetence.

    Originally posted by Bunk View Post
    It's poor practice but you still see it a lot. The href attribute of the link should be the URL of the page it links to. Any additional functionality should be added to the event handler for clicking on the link. That way if a user has javascript disabled then they will still be able to click on the link and reach the intended page. This is known as progressive enhancement.
    WBS

    Leave a comment:


  • Bunk
    replied
    It's poor practice but you still see it a lot. The href attribute of the link should be the URL of the page it links to. Any additional functionality should be added to the event handler for clicking on the link. That way if a user has javascript disabled then they will still be able to click on the link and reach the intended page. This is known as progressive enhancement.

    Leave a comment:


  • NotAllThere
    replied
    Thread moved. Seemed more sensible for it to be here than general.

    Leave a comment:


  • VectraMan
    replied
    WTS. Javascript: just calls some javascript in the current page (on the client side) which could do a thousand different things, only one of which would be a link to another page. So bookmarking it, for example, makes no sense at all.

    Leave a comment:


  • d000hg
    replied
    Originally posted by RichardCranium View Post
    Not good enough (the reason, not your answer).

    To my simple mind, since the results page was generated by the web server, it should be possible to write code to embed the appropriate links in that results page, rather than embed some code that generates the link. Duh.

    Alternatively, where some form of database is at the back end, have the relationship between the data items returned as results and the link to additional information stored together or based upon one another, then the appropriate link can be embedded in the results page.

    So, still no excuse.

    I don't want to use an 'interactive web application' that poorly represents some of a web site's functionality. I want to use a web site.
    In many cases, a link doesn't reload a whole page but gets some more data from a web-service which is used to update the page. The idea of web 2.0 (ugh) is that you don't get full page reloads, but the page looks like a proper application rather than a set of pages.

    However there are cases where they do do a whole page load and you can well argue the developers are being lazy, doing too much in javascript. So maybe the answer to your question is "the developers aren't very good".

    Leave a comment:


  • OwlHoot
    replied
    Originally posted by RichardCranium View Post
    I'm sure there's probably a simple answer for this and I'm a numpty for not knowing it, but I need someone to explain to me what that reason is.

    Why do some web sites have links that cannot be right-clicked on? They are either javascript:__whatever('xxx') or javascript:() or some such.

    They seem to appear most often on web pages where there are a few links I will want to open for future reference, without navigating away from the page I am on. For example, I do a search and the results each come back with one line per result each with a button for more details. Clicking on the button navigates away from the search results page and it is not possible to <right-click> on the button to select 'open in another tab/window'. ...
    You could try ctrl + left_click instead, although that would probably have the same (non-)effect.

    One of my web bugbears is sites that prevent use of the back button, either accidently (one assumes) by a redirect without delay or by somehow deliberately intercepting the back button. It's an example of incompetent and/or aggressively coercive style that you'd think companies would realize by now simply drives customers away.

    Leave a comment:


  • RichardCranium
    replied
    Originally posted by d000hg View Post
    Most likely they are not links worked as links, but links which have some arbitrary code attached to them, activated when clicked. So you can't open in a new tab because there is no URL to open.
    Not good enough (the reason, not your answer).

    To my simple mind, since the results page was generated by the web server, it should be possible to write code to embed the appropriate links in that results page, rather than embed some code that generates the link. Duh.

    Alternatively, where some form of database is at the back end, have the relationship between the data items returned as results and the link to additional information stored together or based upon one another, then the appropriate link can be embedded in the results page.

    So, still no excuse.

    I don't want to use an 'interactive web application' that poorly represents some of a web site's functionality. I want to use a web site.

    Leave a comment:


  • cojak
    replied
    And while we're at it companys need to realise that they don't endear themselves to me when they 'cut' the back breadcrumb trail to the previous page. When I notice this I immediately stop using that site, there are plenty of others that won't treat me with contempt.

    (Although that sort of thing happens less these days...)

    Leave a comment:


  • d000hg
    replied
    Most likely they are not links worked as links, but links which have some arbitrary code attached to them, activated when clicked. So you can't open in a new tab because there is no URL to open.

    Nick will probably give a better explanation. But yes it annoys me too.

    Leave a comment:


  • RichardCranium
    started a topic javascript links you can't right-click on. Why?

    javascript links you can't right-click on. Why?

    I'm sure there's probably a simple answer for this and I'm a numpty for not knowing it, but I need someone to explain to me what that reason is.

    Why do some web sites have links that cannot be right-clicked on? They are either javascript:__whatever('xxx') or javascript:() or some such.

    They seem to appear most often on web pages where there are a few links I will want to open for future reference, without navigating away from the page I am on. For example, I do a search and the results each come back with one line per result each with a button for more details. Clicking on the button navigates away from the search results page and it is not possible to <right-click> on the button to select 'open in another tab/window'.

    When it happens on job sites, or employer's vacancy lists, or on-line shopping sites, it is really annoying. Because clicking on the button then takes you into a process (filling in an application form, selecting colour/size/qty, etc.) one is taken a long way from the original list and so the search results are lost. I am then unlikely to take full advantage of what the site is there for.

    Basically, I want to be able to keep the search results page open all day and pick and choose off the results at my leisure. Preventing this seems to me to be working against the principle of how the WWW is supposed to work.

    Why are web sites designed this way?

Working...
X