Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When you go on a page and you click on something that calls up a javascript (like sections on Wikipedia that generate the '#...' in the URL) the URL changes in the address bar of your browser.

On Wikipedia, I can just use a link the includes the #... to go to a specific section. However, in other cases, it doesn't work, for example http://local.filmon.com/#ITV1 will just redirect to http:// local.filmon.com/#LIVE-BOXING.

I don't know anything about these things so I'm sorry if I was vague. I just want to know if by any means, in the latter example, it is possible to go to the page http://local.filmon.com and load the ITV1 channel without having to actually click on it on the left-hand side.

edit: In the case of the video I want (the ITV1 from filmon), when I inspect element in Firefox I find:

<strong class="channels_search_title" style="text-overflow: ellipsis; max-height: 30px;">
 <a class="fake" alt="ITV1 " href="javascript:void(0);">
    ITV1 
 </a>
</strong>

But I can't use javascript:void(0) as an internal hyperlink I assume, so I'm still stuck.

share|improve this question
add comment

1 Answer

The concept you are referring to is actually known as "Internal Hyperlinking". There's no JavaScript involved here.

An internal link is a hyperlink that is a reference or navigation element in a document to another section of the same document or to another document that may be on or part of the same website or domain of the internet. In articles like this one, the words highlighted in blue are examples of internal links.

In short, you are able to access the specific section directly because id of the tag is same as the one you are entering after '#'.

Reference:

http://en.wikipedia.org/wiki/Internal_link

http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_a_href_anchor


You are accessing the section of the page using its id only. Let's consider example of: http://www.xbox.com/en-IN/index#CopyrightLogo

When you click this link, the browser will scroll down to the bottom automatically to bring Microsoft Logo into frame.

Here, 'CopyrightLogo' is the id of the Microsoft Logo you can see at the bottom right corner of the page. You can check the id by:

  • Internet Explorer: Pressing F12 on key board & then pressing Ctrl+B and then click Microsoft Logo in the bottom right corner. It'll show you the id of the logo as 'CopyrightLogo' enter image description here
  • Google Chrome: Right click on Microsoft Logo in the bottom right corner & select Inspect element will give you the id of the logo as 'CopyrightLogo'

Finally, I found is http://www.filmon.com/#ITV%2B1 the link you want to access. I was unable to find http://www.filmon.com/#ITV1. The nearest match is ITV+1 whose html representation is ITV%2B1.

share|improve this answer
    
I see thanks! But then why can't I access the link in my second example? –  user226995 May 27 '13 at 5:08
    
@user226995: You cannot access the link in your second example because there's no internal link available for the link you want to access. See, every element on a page has a unique id. The id of the link you are accessing may not be 'ITV1', instead it may be 'Interactive-TV-1' (or whatever it's id is). I wasn't able to find anything like ITV1. Other examples include: –  Daredev May 27 '13 at 5:25
    
Can you quote an example from wikipedia? –  Daredev May 27 '13 at 5:43
1  
I see... Here is an example on Wikipedia: en.wikipedia.org/wiki/Anglo-saxons#History –  user226995 May 27 '13 at 14:42
    
Exactly, what I wanted. Well, it really is a new thing for me too… :) But the concept remains the same. You are accessing that section of the page using the id of the element only. I'm editing my answer. –  Daredev May 27 '13 at 17:12
show 6 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.