rejetto forum
Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: kaler on September 01, 2009, 03:51:38 PM
-
in my last post i had a script, which deactivate your account, when you put in the rigth code.
Now i have a question:
My script is activate, when you put in the wrong code and then it abort the request
and it is activated, when the user out in the rigth code, and there is an alert : "do you want to delet your account."
But i dont know how i make two butten (ok and reset) i can only one withe he funktion yes or no. can you help me
Here the code:
<script type="text/javascript">
function validateCode(form){
if (form.code1.value != form.code2.value){
alert("%user%! The Code is wrong. Please try again.");
return false;
}
if (form.code1.value = form.code2.value){
alert("%user%! Do you want really to delet your account?");
return true;<-- Here is the button which says jes-->
return false;<--but this bottun don't work-->
}
return true
}
</script>
-
can nobody say me, how i can make a alert with 'ok' and 'abort'....
thank you if you did it...
-
use confirm() instead of alert()
Remember that this is a hfs related forum, for elementary javascript manuals google, you will find there texts in your language. ;)
-
jeha i know... but when i came with the macros they ask me why i don't use php then i must say, that i must use a very good program, and then they are laughing, so i put my questions here... ( ok by javascript i can use other forums... sorry)
buit thank you for help it works fantastic...
-
function validateCode(form) {
if (form.code1.value != form.code2.value) {
alert("%user%! The Code is wrong. Please try again.");
return false;
}
return confirm('do you really want?');
}