-
Form Submitting only once
How can I make a form to only submit once in this code?
<form name=form1 form method=post action=main.php?action=chat>
<SELECT NAME="chatid">
<OPTION VALUE="normal">Normal
<OPTION VALUE="emote">Emote
</SELECT>
<input type=text name=msg size=55> <input class=button type=submit value=CHAT ondblclick=disabled=true>
It's for chat so I can't change pages, and it only happens when they either hit enter twice or the page refreshes.
-
-
I'd use Javascript. This isn't a security issue, so it doesn't matter if they find a way to get around it, but just to stop them from submitting by accident.
When you send it, set var disabled = 1; in Javascript; check this value with Javascript onSubmit to see if it works; when the data in the field is changed, just make disabled = 0;
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks