DarkReaper Posted August 10, 2006 Share Posted August 10, 2006 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! :) Quote Link to comment Share on other sites More sharing options...
bltesar Posted August 10, 2006 Share Posted August 10, 2006 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:[code]var linkclicked=falsefunction checkclick(url){if (linkclicked){ return void;}else{ linkchecked=true; window.location.href=url; return void;}[/code]now your links should look like this:[code]<a href="javascript:checkclick(URL_for_this_link)">[/code]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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.