jsp - Only want a link to be able to be clicked once -


I have a link that opens up a new page and I was wondering if there was any way to link Click once - such a form can not be presented multiple times.

  & lt; Div id = "addSection" & gt; & Lt; A class = "addSection" onclick = "javascript: writeBookmark (this); var Newwin = window.open ('& lt; c: url value =" / URL_WINDOW "/>;' extra ',' width = 400 , Height = 280, toolbar = no, menu bar = no, scrollbar = yes, resizeable = no '); Newwin.focus (); return tap; "& gt; End Abus and Android and End and Abs and Abs;  

I have javascript to do this with the button but it is not certain that when I am not working with the button.

First of all, I will transfer your click handler so that it does not apply inline. After that, I will add some code to the handler, or either remove the link or replace the click handler with one that will pop up a message which can be used only once.

Example (using jQuery)

  $ ('addSection'). ('Click', function (e) {e.preventDefault (); typing symbol (this); var newwin = window.open ('& lt; c: Url value = "/ URL_WINDOW" /> ',' Extra ',' width = 400, height = 280, toolbar = no, menubar = no, scrollbar = yes; resizable = no '); newwin.focus (); $ (this) .off (' click ' '). (Click', 'function () {Warning (' you have already done this action ');});});  

Comments