*
The moose likes HTML, CSS and JavaScript and the fly likes Remove anchor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Remove anchor" Watch "Remove anchor" New topic
Author

Remove anchor

Anu Jv
Greenhorn

Joined: Apr 02, 2003
Posts: 14
Hi,

I have anchored a link. Once the link is clicked the request goes to the server. During this time, if we click the link, data gets saved multiple times. I need to avoid this duplication. Is there any possibility to remove the anchor from the link once it is clicked to plain text using Javascript?

Thanks
Anu
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
Ok, if you want a simple thing, than pick one of those:

1.


2.


there is 2 problems related to that:
1. Your page might have more than one link on it.
2. If you disabled a link, and user pressed "Stop", the link is disabled, and page is not reloaded.

So, in my code I used more generic approach - after link is clicked, I open a transparent DIV on top of the page. Here is the code I used. It was ment for IE 5.5+, but it should be very simple to port the code for any browser that supports DOM.

Note "spacer.gif" mentioned in the code below is 1px transparent image


[ May 20, 2004: Message edited by: Yuriy Fuksenko ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Remove anchor
 
Similar Threads
Can I Hide the Link or Remove the Link ???
apache-tomcat
anchor tag , click and livequery
display FTP content
Maintaining Unique Sessions in JSP