Jump to content


Multi-click problem

  • Please log in to reply
1 reply to this topic

#1 DarkReaper

  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 10 August 2006 - 04:01 PM

Hello there, i have a problem i need help with ;)

I have a page on it are many links. I need when a user clicks on one of them all of the links should be disabled (or atleast links with the same name/group), so that the information is submitted correctly. Right now if a user clicks 2 times the information gets half way done and some important stuff is losed in the process. Or if there is a way to prevent the multiclicking using php ... enything! HELP! :)

#2 bltesar

  • Members
  • PipPipPip
  • Advanced Member
  • 109 posts

Posted 10 August 2006 - 04:45 PM

This is a JavaScript issue. 

Instead of having your <a href='link1.php'  you'll need to have a JavaScript function determine if a link has already been clicked.

here's the function:
var linkclicked=false
function checkclick(url){
if (linkclicked)
    return void;
    return void;

now your links should look like this:
<a href="javascript:checkclick(URL_for_this_link)">

there are other ways of doing it, and there might be some details that need to be worked out (I'm not sure how the return void will affect the behavior of the links), but that's the basic idea.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users