• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Remove anchor

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic