Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: SubmitOnce


Message #1 by "Natividad Castro" <natocastro@h...> on Mon, 26 Nov 2001 18:49:05 -0500
> This is just a thought, but there must be at least one field within your 
> form that would be unique to each record/user, right?  Rather than 
> creating a SQL Query to search for and compare every field in the table, 
> you could look for just the one field and if it's identical, then it must 
> be a duplicate record and you can delete it.
> =========
> I have a problem with a form because users submit it more than once, so I
> got duplicate records in the DB. I want to stop them from sending more 
> than
> once. I created a function, but works only in IE. Does anybody know
> something that can work in different browseers?
> 

The function submitOnce in a previous reply seems to work fine however I 
use it, and does the exact same thing as a script I wrote for the same 
purpose (for sending email in a web based email client). It would be wise 
to do both client-side and server-side checking of form data though - it's 
a good habit to get into. If you can't check the server-side stuff for some 
reason, you could write a some SQL to clear duplicate records from a 
database whenever the form is submitted (a bit messy but I've seen some 
apps which do

  Return to Index