Page 1 of 1

Questions regarding button click and Dialog

PostPosted: 29 Jul 2014 14:53
by Girish
Hello
I have two questions in reference with attached sample.
1. I am attaching runtime a "TIWCGJQFrame" in the main form in a region. I wrote a procedure which is called either on Menu Item click or a button click.
On menu item click it attached successfully while on button Click it does not. why? :?
2. Further on attached frame, On button Click JQDialog doesn't open while code is there. why?

Please help me finding the reason.

you can search in sample source code "question" directly to find the place where it does not work as expected.

Thanks

Re: Questions regarding button click and Dialog

PostPosted: 29 Jul 2014 15:05
by Jorge Sousa
Hello

Its doesn't work because you're in an ajax (async) event, which very different from a submit event.

you can easily turn the ajax event into submit event set OnClick.Ajax = False (default for menu items).

But this will submit the whole page, and not only the frame.

Fortunatelly, we've a very unique extension to web apps, that is the RenderAsync method:

Support renderization of HTML/script by ajax, including adding, replacing and destroying html at the same time we do in Delphi, in an ajax/async event-

see JQueryDemo_V2 and look for RenderRegionAsync or AjaxReRender, not forgetting the CGCallbackDisableAjaxResponse and CGCallbackEnableAjaxResponse.

Re: Questions regarding button click and Dialog

PostPosted: 29 Jul 2014 15:10
by Alexander Bulei
Hi,

About:

2. Further on attached frame, On button Click JQDialog doesn't open while code is there.


You have JQDialog.Visible = False and parent.RenderInvisibleControls = False.

Please, check Intraweb's documentation for RenderInvisibleControls property.

Best Regards.