Well I think you are over doing it checking for duplicates values, since
basically you are scanning the whole database.

Wouldn't it be better caching/blocking the fisrt/second submit so that it s not
even processed?


"Shanmuga, KR" wrote:

> u need to check from the server side (database) for
> the duplicate values and popup a messg window to the
> client abt that the record already exists ! if he hits
> twice or more. (i think all the database applications
> has the function to check for duplicate values.)
>
> unless if u want to do in the client side itself then
> u need to do a lot like storing the values
> temporarily, if the user hits submit check these
> values with already stored values, if not matching
> then u can pass those values to the server, otherwise
> u can stop the user ....
>
> hope i've given atleast an idea.
>
> cheers
> shan.
>
> --- Chin Cedric Sung Kit <[EMAIL PROTECTED]> wrote:
> > hi,
> >
> > this is off-topic.  i would like to know is there
> > anyway to prevent the
> > user from hitting the submit button more than once?
> > because if the user
> > clicks twice or more, one or more duplicated data
> > will be sent to the
> > servlets; and duplicated data will be written into
> > the database  as
> > well....
> >
> > is there anyway to prevent this?
> >
> > thanks
> >
> > regards,
> > ced
> >
> >
> ___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > and include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives:
> >
> http://archives.java.sun.com/archives/servlet-interest.html
> > Resources:
> >
> http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help:
> http://www.lsoft.com/manuals/user/user.html
>
> __________________________________________________
> Do You Yahoo!?
> Get Yahoo! Mail - Free email you can access from anywhere!
> http://mail.yahoo.com/
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to