CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Displaying JQDialog in JS

by mait » 30 Nov 2016 10:32

Is there a way to both display and hide a TIWCGJQDialog using javascript in the browser rather than using an async call back to the server? (Clicking the "X" button at the top right closes the dialog so there must be some way to do it.)

Thanks, Peter
mait
 
Posts: 10
Joined: 11 Feb 2015 10:12

by Alexander Bulei » 30 Nov 2016 10:56

Hello,

If you understand javascript and properties of Event, you can use the client side javascript.

The javascript code is generated from functions with js perfix.

E.g:

delphi code
IWCGJQButton1.JQButtonOptions.OnClick.Script:= Format('function(){ %s; }',[IWCGJQDialog1.JQDialogOptions.JsClose]);


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 mait » 30 Nov 2016 23:01

Works well thanks. Moving a lot of processing from the server to the browser has been a steep learning curve but the more I learn the more I like the CGJQ components. Really appreciate your help.

For those coming across this post at some later stage, the javascript calls are:

javascript code
$("#MYDIALOG").dialog("open");
$("#MYDIALOG").dialog("close");


if you wish to notify the server that the visibility status has changed (the next time the form is submitted) then the following line should do the trick.

javascript code
AddChangedControl("MYDIALOG_VISIBLE");


Thanks, Peter
mait
 
Posts: 10
Joined: 11 Feb 2015 10:12


Return to JQDialog

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.