Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Remove anchor

 
Anu Jv
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic