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! :) Link to comment https://forums.phpfreaks.com/topic/17149-multi-click-problem/ 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. Link to comment https://forums.phpfreaks.com/topic/17149-multi-click-problem/#findComment-72575 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.