CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

MenuItems OnClick Event

by feland » 17 Dec 2015 10:15

Hi
I have a TIWCGJQMenuItem,
There is a way to run the event on click of the item without phisically click on the item menu?

For the button I'm doing this:
Code: Select all
 btnConfirm.TriggerEventInBrowser(jqbtnateClick);


There is a similar way for the item Menu??

Is very URGENT,

Thanks,
feland
feland
 
Posts: 89
Joined: 15 Jun 2015 15:12

by assapan » 17 Dec 2015 11:15

Hi feland,
Do you need this to be executed on client or server ?
Could explain more deeply your need ?
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by feland » 17 Dec 2015 11:51

On client.
This event permits me to create a new frame into the main form.

Following the event that i will call (procedure TfrmMain.MenuIWCGJQMenuItems1Click(Sender: TObject; AParams: TStringList);)
Code: Select all
procedure TfrmMain.MenuIWCGJQMenuItems1Click(Sender: TObject; AParams: TStringList);
var
  MenuItem: TIWCGJQMenuItem;
begin
  try
    MenuItem := Sender as TIWCGJQMenuItem;
    CreateTabFrame(MenuItem.MenuItemName);
  except
    on e: exception do
    begin
      InsertErrorLog('EXCEPTION: Error in MenuIWCGJQMenuItems1Click(uMainForm): ' + e.Message);
      CreateMsgDlg(DlgError,
        'A technical error has occurred. Please try again in a few minutes. If the problem persist contact technical support');
    end;
  end;
end;
feland
 
Posts: 89
Joined: 15 Jun 2015 15:12

by assapan » 17 Dec 2015 11:59

So this is at server side , not handled by a javascript .

you can call MenuIWCGJQMenuItems1Click(MyMenuItem,Nil); this will operate the "MyMenuItem" click
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Alexander Bulei » 17 Dec 2015 16:00

Hi feland,

You don't need it.
Just "isolate" the code into private/public procedure, and call then you need.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by feland » 17 Dec 2015 16:02

Thanks
feland
 
Posts: 89
Joined: 15 Jun 2015 15:12


Return to JQMenu

Who is online

Users browsing this forum: No registered users and 2 guests

Contact Us.