Sorted, thanks Greg!
> try something like :
>
> function confirmDelete(param1)
> {
> if (confirm ("Are you sure you want to permanetly DELETE this
> record?"))
> {
> document.location="deletetrainingresponse.asp?"+param1
> }
> }
>
> <a href="javascript:confirmDelete(246)">Craig</a>
>
> your approach may work if you add the keyword RETURN before the
> confirmDelete() Javascript call.
>
> > -----Original Message-----
> > From: c.harrison@b... [mailto:c.harrison@b...]
> > Sent: 24 April 2001 12:04
> > To: javascript@p...
> > Subject: [javascript] ARE YOU SURE? PROMPT DOES NOT STOP PROCESSING
> >
> >
> > I want to be able to prompt the user ('Are you sure?') after they are
> > trying to delete a record by clicking on the following link:
> >
> > <A onClick="confirmDelete()" HREF = "deletetrainingresponse.asp?
> > editID=246">Craig</a>
> >
> > The Javascript Code I have is:
> >
> > function confirmDelete() {
> > if (confirm ("Are you sure you want to permanetly DELETE this
> > record?"))
> > {
> > return true
> > }
> > return false
> > }
> >
> > The prompt works fine and it appears to process the returns,
> > whether true
> > or false, correctly but it does not stop the processing of the link.
> >
> > Can anyone suggest how i might stop the link from being
> > processed if the
> > user cancels the request?
> >
> > Thanks.
> >
> > Craig.