Hej! <input type="button" onclick="this.form.submit(); this.style.disabled='true';" value="Skicka"> Funkar ej... Det här ska fungera: Hej, får det ej att fungera...Onclick Disable submit knapp.
Många medlemmar dubbelklickar, jag vill inaktivera subit knappen efter en klick.
Tips?
Mvh HassanSv: Onclick Disable submit knapp.
Möjligt att du kan skippa "style" i this.style.disabled. Sv:Onclick Disable submit knapp.
Min submit:
<input name="Submit" type="submit" id="Submit" value="Submit">Sv: Onclick Disable submit knapp.
<code>
<input name="Submit" onclick="this.disabled='true';this.form.submit()" type="submit" id="Submit" value="Submit">
</code>Sv:Onclick Disable submit knapp.
Detta är min kod:
Mellan Head taggarna.
<code>
<script language="javaScript">
function tecken()
{
if (document.kontroll.username.value=="")
{
alert("You have to enter your username.");
return false;
}
if (document.kontroll.email.value=="")
{
alert("You have to enter your email");
return false;
}
if (document.kontroll.password.value=="")
{
alert("You have to enter your password!");
return false;
}
if (document.kontroll.remail.value=="")
{
alert("You have to verify your email.");
return false;
}
if (document.kontroll.rpassword.value=="")
{
alert("You have to verify your password!");
return false;
} else {
document.kontroll.submit.disabled = true;
return true;
}
}
//-->
</script>
</code>
Mellan Body Taggar.
<code>
<strong><font color="#FF0000">* Required Field</font><br>
<br>
Username:<br>
</strong>
<form action="signup2.asp?steg=2" method="post" name="kontroll" onSubmit="return tecken()">
<strong>
<input name="username" type="text" id="username">
<font color="#FF0000">*</font><br>
</strong>Begin with a letter, and use only letters (a-z),
numbers (0-9), the underscore (_), and no spaces. <strong><br>
<br>
Email:<br>
<input name="email" type="text" id="email">
<font color="#FF0000">*</font><br>
</strong>You must activate your account after signing
up, this is for your own safety (Ex: my@mail.com)<strong>.<br>
<br>
Confirm Email:<br>
<input name="remail" type="text" id="remail">
<font color="#FF0000">*</font><br>
</strong>The same as email field.<strong><br>
<br>
Password:<br>
<input name="password" type="password" id="password">
<font color="#FF0000">*</font><br>
</strong>Use a password, Make sure it is difficult for
others to guess.<strong><br>
<br>
Confirm Password:<br>
<input name="rpassword" type="password" id="rpassword">
</strong><strong><font color="#FF0000">*</font></strong><br>
The same as password field.<br>
<br>
<input name="Reset" type="reset" id="Reset" value="Reset">
<input name="Submit" type="submit" id="Submit" value="Submit">
</form>
</code>
Hur lägger jag in den?
Har testat med din kod men de funkade inte.
Mvh Hassan