The Arcive of vBulletin Modifications Site. |
|
Disable Submit II Details »»
|
|||||||||||||||||||||||||
You will need to edit the 'NewThread' and 'NewPost' template
This is another version of Xenon's Disable Submit but it disables the buttons instead. Two steps for each template ![]() Insert the following code anywhere between <head> and </head> Code:
<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>
find: Code:
onSubmit="return validate(this)" Code:
onSubmit="return validate(this),submitonce(this)" Works with all vB versions. The buttons just turn grey like you cant click them anymore ![]() Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Quote:
Very intresting, i didn't know ^^ |
|
#3
|
||||
|
||||
|
sorry for been stupid, but what does it actually do?
|
|
#4
|
||||
|
||||
|
Are you holding out on us again?
![]() Quote:
|
|
#5
|
||||
|
||||
|
im confused too... and wouldn't this be a template edit?
|
|
#6
|
|||
|
|||
|
I guess, but you can take it as a hack.
|
|
#7
|
|||
|
|||
|
I am still lost on the purpose of this hack. and yes this is a template edit because there is no PHP files that were hacked. Can you please xplain what it does thanks.
|
|
#8
|
||||
|
||||
|
Quote:
|
|
#9
|
||||
|
||||
|
I think it disables the Submit button after it's been clicked, probably to prevent double-posting. At least, that is my guess, based on the name of the function: "submitonce".
|
|
#10
|
||||
|
||||
|
Well there is already a hack that disables double-posting, by merging your double post with it's previous..I find this method much better.
|
![]() |
|
|