Home » Developer & Programmer » Forms » Help...
Help... [message #82404] Mon, 26 May 2003 00:35 Go to next message
Mubeen.
Messages: 1
Registered: May 2003
Junior Member
hi,

Here is the scenario.

I have created an alert in form (login)and I have also created a menu item(file menu)in which there is submenu
(exit),when i am calling the alert in menu code of submenu(exit)though i am pressing the default buttons'yes' or 'no' it is exiting the form ,which should not happen when i am pressing the no button.

here is the code i have written in pl/sql editor of submenu (exit).

declare

x1 number;

begin
x1 :=show_alert('ex_alert');


end;

please help me out.

thanx in advance.

Mubeen.
Re: Help... [message #82405 is a reply to message #82404] Mon, 26 May 2003 01:04 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Where do you evaluate which button has been pressed?
Let's say that the 1st button is 'OK' and the second is 'Cancel'. That would make me use code like this:
declare

x1 number;

begin
-- variable x1 will contain the value of the button being
-- pressed by the user
x1 :=show_alert('ex_alert');

-- If user pressed button 1 ("ok")
If x1 = ALERT_BUTTON1 THEN
-- Acknowledge and exit.
	Message('ok');pause; exit_form;
-- If user pressed other button ("Cancel")
Else
-- Acknowledge and continue.
	Message('cancelled');pause;
End If;

end;

MHE
Re: Help... [message #82408 is a reply to message #82404] Mon, 26 May 2003 02:06 Go to previous message
ash
Messages: 43
Registered: February 2001
Member
bro, please try this:

/*
-- 88 is numeric value of OK Button
-- 89 is numeric value of Cancel Button
*/

declare
x1 number;
begin
x1 := show_alert('ex_alert');

if x1 = 88 then
exit_form;
elsif x1 = 89 then
message('Exit form cancelled.User changed his mind.');
end if;

end;
Previous Topic: create sequence by a var.
Next Topic: call_form
Goto Forum:
  


Current Time: Fri Mar 29 01:16:34 CDT 2024