NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: kevin plummer on July 30, 2008, 11:46:46 AM

Title: validate delete from a browse
Post by: kevin plummer on July 30, 2008, 11:46:46 AM
Hi All,

I want to execute some code when a user deletes a record from a browse without displaying the form. I can't really see any embed points.

Cheers,

Kevin
Title: Re: validate delete from a browse
Post by: Mike Grigsby on July 30, 2008, 12:54:43 PM
Kevin, one place you might start is in the browse's embed: User did something in browser | User clicked on a row in the browse. You might be able to do some code that checks for the delete action and intercept it before it calls the alert to confirm delete.

There's a reference to the delete popup window in the netweb.js and the function is preparedelete, but I can't seem to find the reference to it in the browse or form. I would think the source of that function being called is where you'd want to put your delete code.
Title: Re: validate delete from a browse
Post by: rayrip on July 30, 2008, 05:00:29 PM
I'm trying to do the same thing. I put a delete button on the browse row and it even asks me if I'm sure... but doesn't delete the record. I'm not calling a form at all. It just doesn't delete the record... which kind of makes sense really because the htm must post something and something else needs to delete the record... I guess it can't do something in the same procedure?

It's confusing because some code creates html and some let's you work on the actual file.

Seems like it ought to work without calling a form... but I'd like to know where to put the actual delete code myself or if it's even possible to call code from a button where the code is located in the same procedure.

I suppose you could set a variable and perhaps call the browse again?

Ray
VMT
Title: Re: validate delete from a browse
Post by: Bruce on August 01, 2008, 05:37:12 AM
Hi Kevin,

The PreDelete routine in the form is the place it _should_ go.
However it has been a long while since I played with the Delete code, so I won't swear to it.

Ray's issue is different - in his case he has a multi-component key.

Cheers
Bruce