Getting dlg to work in webclient

I know there are differences between the SC and WC :) - in that the WC keeps going while the SC ‘waits’ for a dlg to return.
I have read at efw posts but am still confused…I have the following global function that works perfectly in the SC:

function deleteRecord()
{
application.beep()
var answer = plugins.dialogs.showWarningDialog(‘Alert’,‘Do you want to delete this record?’,‘Yes’,‘No’)
if(answer == “Yes”)
{
currentcontroller.deleteRecord()
}
}

Its very neat and I can call it from every form to trap unwanted deletes…so how do I do the same thing in the WC?

Thanks
Al

ok
looks like its more serious than that …I cant use the plugin dialog in the WC :(
Shame cos it was really small and neat.
So I’ll have to design a form to similaute it…

Hey isnt it great when you find your *own answer. For anyone else who is looking this waht I cam up with that works in SC AND WC:

3 functions

  1. Opens the dlg form, which has 2 buttons; yes and no
  2. Yes button deletes record and closes dlg
  3. No button closes dlg

function deleteRecord()
{
currentcontroller.deleteRecord()
application.closeFormDialog()
}

function show_dlg_Delete()
{
application.beep()
application.showFormInDialog(forms.dlg_Delete,‘’,‘’,‘’,‘’,‘Warning’,false,false,‘Warning’,true)
}

function hide_dlg_Delete()
{
application.closeFormDialog()
}