Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Posting Flood Simple Solution
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Dr. FIX
New Member

81 Posts

Posted - 14 April 2002 :  12:44:49  Show Profile
sometimes.. users press on the "Post New Topic" or "Post Reply" button many times ((accedently)) which result the Flood Protection Activation... ok! use this script in your site where do you want buttons to truned off after 1 click on it.

see preview at: http://www.geocities.com/topsecretzonex/Once.htm

please note: copy and paste the shortcut in your browser to see the page, some scripts errors will appear, it's not cause by this code but by the Yahoo! code (conflict).


The Code:
<script language="JavaScript">
<!--
var wasclicked = false;
function regsubmit(obj)
{
obj.disabled=1;
if (!wasclicked)
{
wasclicked=true;
window.focus();
}
return false;
}
//-->
</script>

then.. replace the button with this:
 
<input class="Bsbttn" onclick="return regsubmit(this);" type="submit" value="Post New Topic" name="Submit"><p></p>


it should work to anyone... hope you find this usefull, i know that's it simple but it's useful.. isn't!?

$--Dr. Fix--$

crash
Advanced Member

Netherlands
2064 Posts

Posted - 14 April 2002 :  19:42:57  Show Profile  Visit crash's Homepage
usefull yes, but replacing all my buttons with that code? hmmm... if there only was some kind of variable for it...

eg:
<% =strNoClickTwice %>


and that would stand for

class="Bsbttn" onclick="return regsubmit(this);"


then i just might consider it...



Crash's Site | Crash is from
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 15 April 2002 :  01:29:18  Show Profile  Visit Gremlin's Homepage
Actually Crash theres probly only 2 or 3 places where you would need to add that code, so its not a big deal really.

If you just change your post.asp file and add the following to the form tag that surrounds the new post input form you'll achieve a similar results


<form action="post_info.asp" method="post" name="PostTopic" onSubmit="document.PostTopic.Submit.disabled=true;document.PostTopic.Submit.value='Please Wait';">


www.daoc-halo.com
Go to Top of Page

Dr. FIX
New Member

81 Posts

Posted - 15 April 2002 :  07:25:19  Show Profile
Crash.. you need only to make changes to 2-3 pages only as (Gremlin) said, so no need to make this more complicated

cheers

$--Dr. Fix--$
Go to Top of Page

crash
Advanced Member

Netherlands
2064 Posts

Posted - 26 April 2002 :  19:35:37  Show Profile  Visit crash's Homepage
well... kind of got it to work... however, i could only find one place to use this, and some buttons now do not have the effect...

maybe someone would care to tell me exactly where to paste the code?



Crash's Site | Crash is from
Go to Top of Page

crash
Advanced Member

Netherlands
2064 Posts

Posted - 26 April 2002 :  19:38:36  Show Profile  Visit crash's Homepage
nevermind. fixed it. thanks guys!



Crash's Site | Crash is from
Go to Top of Page

rik1471
Starting Member

27 Posts

Posted - 22 May 2002 :  10:25:57  Show Profile
Cheers Gremlin, worked a treat

Go to Top of Page

alex042
Average Member

USA
631 Posts

Posted - 22 May 2002 :  10:30:45  Show Profile  Send alex042 an AOL message  Send alex042 a Yahoo! Message
The flood MOD doesn't work for this?


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07