erich.wanker Posted February 18, 2016 Share Posted February 18, 2016 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 More sharing options...
erich.wanker Posted February 18, 2016 Author Share Posted February 18, 2016 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 More sharing options...
Alessandro Posted September 21, 2016 Share Posted September 21, 2016 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 More sharing options...
Sherzod Posted September 21, 2016 Share Posted September 21, 2016 Hi, ajaxRequest(MainForm.form, "_test", []); or ajaxRequest(MainForm.window, "_test", []); instead of ajaxRequest(MainForm, "_test", []); Best regards. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now