Jump to content
uniGUI Discussion Forums
erich.wanker

ajaxRequest to MainForm

Recommended Posts

Hello ..

 

i want to add html to a UniHTMLFrame .. and if a user clicks on a item - i want to handle it

 

 

I have in TS_AGENT = class(TUniForm) a UniHTMLFrame1: TUniHTMLFrame with:       

    UniHTMLFrame1.HTML.Append('<div class="navigationsgrundflaeche" onclick="ajaxRequest(MainForm,"AGENT" , ["parameter="'+frage.Text+' ])"; ><p>' + beschriftung + '</p></div>');
 
in MainForm - i have 
procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string;
  Params: TStrings);
begin
if EventName='AGENT' then  showmessage(Params[0]);
but nothing works :-(
 
 
what is the right syntax for this?
 
ThanX for help
Erich

 

Share this post


Link to post
Share on other sites

got it...

 

        UniHTMLFrame1.HTML.Append('<div class="navigationsgrundflaeche" onclick="javascript:ajaxRequest(MainForm.form,''AGENT'',[''param0=+frage.Text+''',''param1='+frage.Text+'']);"><p>' + beschriftung + '</p></div>');

Share this post


Link to post
Share on other sites

 

Hello ..

 

i want to add html to a UniHTMLFrame .. and if a user clicks on a item - i want to handle it

 

 

I have in TS_AGENT = class(TUniForm) a UniHTMLFrame1: TUniHTMLFrame with:       

    UniHTMLFrame1.HTML.Append('<div class="navigationsgrundflaeche" onclick="ajaxRequest(MainForm,"AGENT" , ["parameter="'+frage.Text+' ])"; ><p>' + beschriftung + '</p></div>');
 
in MainForm - i have 
procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string;
  Params: TStrings);
begin
if EventName='AGENT' then  showmessage(Params[0]);
but nothing works :-(
 
 
what is the right syntax for this?
 
ThanX for help
Erich

 

Hello!
You could call the procedure?
I did the same thing, but mine did not work.

Share this post


Link to post
Share on other sites

Hi,

ajaxRequest(MainForm.form, "_test", []);

or

ajaxRequest(MainForm.window, "_test", []);

instead of

ajaxRequest(MainForm, "_test", []);

Best regards.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×