Jump to content

ajaxRequest to MainForm


erich.wanker

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

 

Link to comment
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>');
Link to comment
Share on other sites

  • 7 months later...

 

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.
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...