Records deletion is already working
http://www.fivetechsoft.com/fivegen (please email me for login and password if you want to beta test it)
This code is very interesting as it shows how we use "codeblocks" in JavaScript and also how we simulate "modal" execution:
Code: Select all | Expand
function Delete()
{
var nSelected = BrwSelCount( oFrame );
if( nSelected == 0 )
{
MsgInfo( "Please select one record to edit" );
return;
}
else if( nSelected > 1 )
{
MsgInfo( "Please select only one record to edit" );
return;
}
OnYes = function()
{
oDlg.End();
oFrame.src = "http://www.fivetechsoft.com/fivegen/delete.php?table=" + Alias() +
"&recno=" + BrwSelRecord( oFrame );
};
MsgYesNo( "Do you want to delete it ?", OnYes );
}
OnYes is a public variable that holds a "codeblock". It will be evaluated when "Yes" is selected from MsgYesNo().
Don't miss this great chance to learn these advance coding techniques for the web
![Smile :-)](./images/smilies/icon_smile.gif)