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/Code)
 Get rid of double posts
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 02 November 2000 :  22:48:34  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
I saw this @ dynamicdrive.com and figured it would be useful to prevent double posts, when someone clicks on submit, the button is disabled. The script is below. ( http://www.dynamicdrive.com/dynamicindex11/submitonce.htm )


<font color=red>usage:</font id=red><font color=blue><form method="whatever" </font id=blue><font color=green>onSubmit="submitonce(this)"</font id=green><font color=blue>></font id=blue>
<script>
function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}
</script>

<font color=red>Da_Stimulator</font id=red>
<font color=red>http://aokingdom.com</font id=red>
<font color=blue>response.write("I know what you coded last summer!")</font id=blue>

Edited by - Richard Kinser on 05 January 2001 00:22:24

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 05 January 2001 :  00:24:09  Show Profile
Da_Stimulator,

Just so you know, I edited the above post to fix the javascript code so it would show correctly. This was a result of the database work that Gor was doing a few weeks ago.
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.13 seconds. Powered By: Snitz Forums 2000 Version 3.4.07