This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Link IDs on Page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Link IDs on Page" Watch "Link IDs on Page" New topic

Link IDs on Page

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1533
Will it cause any problems to have more than one hyperlink with the same ID?
I am using a record sequence index number and assigning this to two link ids. Then this id is used as a parameter for a js function.

One link is used to update record in table row and the second link is used to delete record in table row.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63052

All id values on a page must be unique.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton

Joined: Sep 29, 2008
Posts: 12617

Uniqueness is kind of the point of an ID--why would you want them to be the same? If your only purpose is to use the ID as a parameter... why not just use the ID as a parameter, and not an ID?
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Link IDs on Page
It's not a secret anymore!