Link and Anchor, what is the difference ???

  • Permalink
  • submit to reddit
  • Email
  • Follow


What is the difference between a link and an anchor in Javascript (DOM level
0) ?

Ton


--
Computer museum tonh: http://www.tonh.net/museum - 10.000 visitors !!
GGGallery website generator: http://www.tonh.net/gggallery
Vrij Kunst Centrum : http://www.meesterschap.nu



0
Reply Ton 1/12/2004 2:47:35 PM

See related articles to this posting


Ton den Hartog said:
>
>
>What is the difference between a link and an anchor in Javascript (DOM level
>0) ?

A Link has an HREF attribute.  An Anchor does not.

0
Reply Lee 1/12/2004 3:02:58 PM

> >What is the difference between a link and an anchor in Javascript (DOM
level
> >0) ?

> A Link has an HREF attribute.  An Anchor does not.

<a href="http://www.mysite.com">My Site</a>

No ? :-)

Maybe the question is, what IS a link and an anchor..... ?

Ton


0
Reply Ton 1/12/2004 9:00:57 PM

On Mon, 12 Jan 2004 22:00:57 +0100, Ton den Hartog 
<ton.den.hartog.removespam@tonh.net> wrote:

> Maybe the question is, what IS a link and an anchor..... ?

Typically:

   A link is used to take the user to a new location, or to perform an 
action (if scripting is used).

   An anchor is a destination that can be targeted by a link.

The former is acheived with the A element. The latter can also be done 
with the A element and its name attribute, or by specifying a value for 
the id attribute in other elements. To target an anchor, use a fragment 
identifier (#frag-id) in the URI:

<A href="#Section-1">Section 1</A>
<A href="#Section-2">Section 2</A>
  ...
<H1><A name="Section-1">Section 1</A></H1>
  ...
<H1 id="Section-2">Section 2</H1>

For more information, see:

   Links -

       http://www.w3.org/TR/html4/struct/links.html

   Fragment Identifiers -

       http://www.w3.org/TR/html4/intro/intro.html#fragment-uri


Both are taken from the W3C's HTML 4.01 Specification. There are too many 
bits within the 'Links' section to reference individually, so just read it 
all. :)

Hope that helps somewhat,
Mike

-- 
Michael Winter
M.Winter@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
0
Reply Michael 1/12/2004 10:10:23 PM
comp.lang.javascript 37810 articles. 16 followers. Post

3 Replies
771 Views

Similar Articles

[PageSpeed] 29


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

How to link different site-packages to different Python?
Hi all, I have Python 2.4 and 2.5 in my PC. And PythonWin is installed as IDE. When I tried to use site-packages "Numpy", I installed the both version (i.e. for 2.4 and 2.5). Python 2.4 and Numpy for it work together well. But when I type "from numpy import *" in Python 2.5. It throw out an error indicate that the numpy library is link to Python 2.4 package? How to fix this problem? The error pasted below is copied from Python 2.5 PythonWin console: Traceback (most recent call last): File "<interactive input>", line 1, in <module> File "...

Browsing different workgroups over different subnets and over VPN-link
I'm having problems with my samba setup for browsing over multiple networks. As of today I have three different networks located in different physical locations. Each network has a samba server running as local master with different workgroup names. Now I've established VPN-tunnels out from each of these networks to a common "hub"-point (this point isn't running samba). network 1 (192.168.20.0/24) | | | hub (network irrelevant, it's just used for tying together the vpns) / \ /...

One GIF: different areas link to different webpages
Dear Folks: I just started learning HTML this week. But I need to finish something by Monday. I have a bare bones version (v.1) but I want to deliver v.1.1. I've been browsing here trying to find some guidance and have been somewhat sucessful. The answer to my issue, I think, involves image maps and AREA tags. I have one GIF. It is a fat horizontal bar with the names of three websites. I'd like each name to be a link. Am I on the right track with Image Maps and AREA tags? Any other advice? Many thanks Raoul On Sat, 26 Nov 2005 20:49:17 +0100, Raoul <...

Linking with different compilers
I have some libraries from one vendor that was built with gcc 3.0.2. I have another set of libraries from another vendor that was built with gcc 3.3. I need to link a program that uses both libraries. I can get the two vendors stuff to link finally, but I'm having trouble with libstdc++ and libgcc_s. The first vendor supplied a version of these in his junk and I have another version for gcc 3.3. I get incompatibulities between libstdc++.so.3 in 3.0.2 and libstdc++.so.5 in gcc 3.3. Both have a libgcc_s.so.1. When I run the program, I get something to the effect: exe : library : version G...

difference between compiling and linking...?
I only know Compiling usede to convert the .cpp file into .obj file. but have really no idea about linking. please let me know about this. Thanking you, Pritam "c++_Passioner" > I only know Compiling usede to convert the .cpp file into .obj file. > but have really no idea about linking. please let me know about this. Here's a great post by the one and only Karl Heinz Bucchegger who, sadly, has been missing lately. http://groups.google.com/group/comp.lang.c++/browse_frm/thread/3274db962f1f060c/8e616babfa4cbc97?lnk=st&q=linking+author%3Akarl+author%3Aheinz&rn...

link different LAPCKs
Hi group, I have a problem with lapack linking. I want to use dgetrs from lapack with extended precision so I add -fdefault-real-8 to the compiler options when I compile blas and lapack from the sources. Now I also want to use dgesvd also from lapack with the normal precision. I have also a lapack version with normal precision. How can I do this? If I link these two lapacks to my program how does the linker differ between them? Now I came to the conclusion to compile the different library functions seperate and than use only them. But maybe in the future I will use some diff...

re links and anchors
Hi just started to experement with styleshhets, and have defined hover a:hover { Color : red; Text-decoration : none; Border-top-width : medium; Border-right-width : medium; Border-bottom-width : medium; Border-left-width : medium; Border-color : rgb(255 , 102 , 51); Border-style : groove; Width : 30%; Display : inline; } but how do i stop this working with anchors eg <h1><a name="top">Strings and Thins</a></h1> i tried definning an a hover, with name with the same colors as h2, but t...

Reposition on a linked page with no anchor?
I'm trying to create a link to a certain part of a page on another website that has no anchor (i.e. ID or name) at the position on the page I want to link to. So I can't do something like theotherpage.html#anchorname. However, since there is a unique keyword at the position I want to link to I thought perhaps I could load the page, then search for this keyword and then reposition to that point. Can javascript do something like this? Thanks "ukrbend" wrote > I'm trying to create a link to a certain part of a page on another > website that has > no anchor (i....

Link different code sections
Friends, Can anyone please help me with the following: My application is running from non-volatile memory mapped at 0x0000-0x4000. I also have external RAM mapped at 0x8000 and above. Events caused in my application changes the execution to a jump vector at the beginning of the external RAM and each of the entries at the jump vector should jump to a specific routine (or C label) residing in the external RAM (starting at the end of the jump vector). How can I specify to the linker which code goes where? 1. Can it use some kind of link file (if so where can I find documentation on this)? 2. ...

Link to table of different name
I have a (linked) table called 'Deliveries' linked to a table of that name in the back-end. I now want to create a new link to another table named 'Deliveries' in a different back-end. I would like to call the linked table in the front-end 'DeliveriesPrevious' but, of course linked to the back-end table named 'Deliveries' I can create a table and connect it: Dim aTable As DAO.TableDef Set aTable = CurrentDb.CreateTableDef("DeliveriesPrevious") aTable.Connect = ";DATABASE=" &...

What is the difference between up and down link on LAN switch?
Hello all - My new desktop LAN switch have 1 up-port and 5 down-ports. If I connect my cable-Modem to the up-port and my PC to the down-port it doesn't work. If I connect both to the down-ports it works? So my question is: What is the difference between up and down plugs? Only crossing the cable lines? The same difference as in the patch cable crossed and not crossed version? Or is a form of priority or special routing implemented on the up-port? BTW: How does the switch knows where the packets have to go? regards - Henry -- <Schau auch mal auf meine Homepage www.ehydra.dyndns.info&...

alias or symbolic link, any difference?
Is there any difference between an alias created by the finder, or a unix symbolic link created from a terminal window? On Sun, 26 Jun 2005 07:27:56 -0500, Luke wrote: > Is there any difference between an alias created by the finder, or a > unix symbolic link created from a terminal window? Yes, there is a difference. Although symbolic links work in the Finder, Finder aliases do not work in the Terminal. Symbolic links are broken if the target file is moved, but Finder aliases are not. -- Dave Seaman Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling. <http://www.co...

linking tables to different databases
Hello- Here is my situation. I have multiple copies of the same database on our MS SQL server (same program, but differnet funding streams). I have an Access 2003 front end that I link to the SQL server for ad-hoc reports and queries. I link all the tables I need from a database (for instance: dbo.tProvider, dbo.tParents, etc) Then I rename the tables links in Access to just tParents, tProvider... this way I can have one query, one report - I just update the links to the new database whenever I need to change sources. Is there a clever way of renaming the 'linked' table names in Acces...

linking subroutine in different directory
hello, How can i compile and link a program that uses subroutines in different directories? as for simple example; $ cat trial.f90 call lm(oidxdn,opnu,opold,oqnu,oqold,avw) call lm_end(oidxdn,opnu,opold,oqnu,oqold,avw) end is compiling as: $ gfortran -c trial.f90 -I/home/rudra/Recursion/LMTO-A but when i am trying to create the executable, it says: gfortran trial.f90 -L/home/rudra/Recursion/LMTO-A -llm /tmp/cc2gfNyf.o: In function `MAIN__': trial.f90:(.text+0x44): undefined reference to `lm_' collect2: ld returned 1 exit status can anyone tell me the wayout? As a work around...

link against stl (different implementation of)
hello everybody, I have an application that uses a 3D engine library compiled as a static library called EnRG.lib. My own code is normally compiled against the MS Visual C implementation of the stl, and everything works fine. I wanted to try to link the same code against the stlport. but I get a lot of linking errors (i report one of those at the end of the message) and I don't understand why... could it be because the EnRG lib is compiled with the MS's stl?? being it a static lib, shouldn't it incorporate the code it needs and leave me free to link my own code against the library...

Linking a file from a different location
Hi I have two .mat data in different folders and would like to call them both into a script file i a different location. Is that possible? Can I call .mat files in different folders into one script file in Matlab? Thanks! On 15 Jun, 17:12, "M K" <mah...@mathworks.com> wrote: > Hi > > I have two .mat data in different folders and would like to call them both into a script file i a different location. Is that possible? Can I call .mat files in different folders into one script file in Matlab? > > Thanks! Sure. Three ways of doing this: 1) Specify the paths t...

Difference between Link and System modelling
I was puzzled when my professor mentioned the difference between Link Layer and System Layer research in wireless communications. I'm working on my final year project for my degree when I proposed to investigate link adaptation technique for a certain air interface technique and how I intend to make use of Simulink to model the channel. Based on the combination of the channel large scale and small scale fading, the link adaptation technique will take into account the trade-off between the BER, data throughput and power according to the channel state information. Thats where I got confused...

Linking proximity sensor to anchor
I'm having really problems at the moment, hope some one can help. I've been told that in Max 8 you can get a (VRML Helpers) Proximity sensor to trigger a anchor node. i'm not sure if this is the case or not, hope it is, really need it for my uni project. So if any one knows how to get a proxmity sensor to trigger an anchor please come to my rescue! Cheers Can't be done by simply using 3DS Max, you need to do a little hand editing. The code you need is below, its fairly straight forward. The strings in the ' (single quotes) are the ones you would want to ch...

How do I get links that do NOT have a different color.
Okay, IE and Netscape have a default link style with "color: blue;" and "text-decoration: underline". That's fine, but for what I am doing I need to turn OFF the default styling. I know how to change it so that it is another color, or force it to NOT have underlining, or make it bold, or italics, or whatever. The problem is, how do I get it to turn the syling OFF completely. How do I get it NOT to change the color or text-decoration of the text? For example: consider the following HTML example: <html> <style type="text/css"> ...

javascript problems linking to anchor
could someone please help me with this bizarre problem - I've created a swf file at the top of my html page. The swf file (using Swish) is simply a menu of 5 links to 5 anchor points on the html doc. The procedure for linking files with swish (same as Flash swf) is: on release { javascript('window.location.href('test.html#anchorname'); } problem is that the buttons in the swf menu work fine for the first 2 buttons that I press but not on the THIRD attempt. For example: (press button 1 - links to anchor 'one'; press button 2 - links to anchor 'two'...

2 different internet Links
I have 2 paths for the internet, I have downlink on a device and the uplink using a different device. how do I set the router/gateway (or what ever I need) to accept the incoming traffic from one device, and the outgoing traffic to use the other device, and which one of them will be my default gateway for the router, do I need to use 2 routers, and if yes, which one of them will be the gateway for the clients? Thanks in advance, Ali ...

Different colors for heading links?
How do I define for example link inside H1 style to be of different color than other links in the same page: <a href="blah">this is some color</a> <h1><a href="blahblah">this is different color</a></h1> I remember seeing suitable code for this a couple of years ago but wasn't able to google my way to it. On Mon, 28 Feb 2005 15:39:54 +0100, Pasi Kovanen <kovis@nospam.iki.fi.invalid> wrote: > How do I define for example link inside H1 style to > be of different color than other links in the same page: ...

FF: anchor links not working..
<a href="#1"> <a name="#1"> this link is not working in FF (works fine in IE..) would appreciate thoughts/suggestions.. thank you.. Frances Frances wrote: > <a href="#1"> > > <a name="#1"> > > this link is not working in FF (works fine in IE..) > would appreciate thoughts/suggestions.. thank you.. IE is fixing your error for you. Firefox is not. It should be <a name="1">. Or use an id on any element instead and get rid of the targetted <a> element altogether. ...

Button and Anchor Styling. They differ ...
Hello, In a page I have: 1. An input (type="submit") button that submits a form. 2. An anchor that cancels the form submission and redirects the user to a page. I am trying to make both look the same having a padding a background color. I tested in Firefox and in IE but in both cases the two don't look the same. I am also using a Reset.css. I posted an example with the HTML and CSS code here: http://www.27lamps.com/Labs/Buttons/Buttons.html Could someone help me out with this? Thanks, Miguel Scripsit shapper: > 1. An input (type="submit"...