erich.wanker Posted February 18, 2016 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 Quote
erich.wanker Posted February 18, 2016 Author 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>'); Quote
Alessandro Posted September 21, 2016 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. Quote
Sherzod Posted September 21, 2016 Posted September 21, 2016 Hi, ajaxRequest(MainForm.form, "_test", []); or ajaxRequest(MainForm.window, "_test", []); instead of ajaxRequest(MainForm, "_test", []); Best regards. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.