File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 1391
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: 60056

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?
I agree. Here's the link:
subject: Link IDs on Page
Similar Threads
to retrive the last row
how to modify the username only once
Record ID's
Dynamic datatable in jsf
Inserting into tables connected by a many-to-many relationship