CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Validation still has problems

General discussion

by asp » 14 May 2014 13:49

Hello!

Thank you for the example. It works fine and now I can use this approach in my application. But it is not obvious for the people who are not familiar with the internal structure of the component. I mean, what script is sent to the browser. I would have never done it by myself if you hadn't sent me the example. So, I think it is necessary to implement some public method because the task is very general.
asp
 
Posts: 235
Joined: 06 Dec 2013 11:17
Location: Moscow, Russia

by Jorge Sousa » 14 May 2014 14:55

Hi

You're right, it would be very good,

but its impossible because, Intraweb uses a form (html tag) per control, killing the possibility of doing validtion per form.

About

I would have never done it by myself if you hadn't sent me the example


Well we could talk a lot about this, let's just say that in either PHP, ASP, etc, you would have to learn much more script than with Intraweb.

This is a very well know plugin, there is lot of documentation available worldwide, using javascript, like we did in the example.

and all cg events we have the property .Script to assign direct client browser script.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by asp » 15 May 2014 09:45

Hello!

There is an issue in your project. Now, OK button click event is called twice. To check it place the breakpoint to the line IWFrameRegion.JQDialogOptions.Close();

Code: Select all
procedure TfrDia.IWFrameRegionJQDialogOptionsButtons0Click(Sender: TObject;
  AParams: TStringList);
var C: TComponent;
    JQValidateOpt: TIWCGJQValidateOptions;
begin
  for C in IWFrameRegion do begin
    if IsPublishedProp(C, 'JQValidateOptions') then begin
      JQValidateOpt := TIWCGJQValidateOptions(GetObjectProp(C, 'JQValidateOptions'));
      if JQValidateOpt.Enable then begin
        if not JQValidateOpt.IsValid then begin
          Exit;
        end;
      end;
    end;
  end;
 
//Place breakpoint here -->
  IWFrameRegion.JQDialogOptions.Close();
//<--

end;
You do not have the required permissions to view the files attached to this post.
asp
 
Posts: 235
Joined: 06 Dec 2013 11:17
Location: Moscow, Russia

Previous

Return to General - Archive

cron

Who is online

Users browsing this forum: No registered users and 2 guests

Contact Us.