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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...