molla2005b Posted July 12, 2016 Posted July 12, 2016 what the problem in This code.Callback url not work. Download //Prepear menu ... SubmitUrl:=UniSession.CallbackUrlEx('MenuClick', Self, ['RES', 'OK']); <ul id="menu1"> <li> <h3><span>Tennis</span></h3> <ul> <li><a href="/">Serves</a></li> <li class="active"><a href="/">Player results</a></li> <li><a href="/">Leagues</a></li> <li><a href="/">Tournaments</a></li> <li><a href="{URL_CALLBACK}">Menu Click Test</a></li> </ul> </li> </ul> Menu_Str:=StringReplace(Menu_Str, '{URL_CALLBACK}', SubmitUrl, []); //Event ... procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = 'MenuClick' then begin if Params.Values['RES']='OK' then ShowMessage('Operation Succeeded: '+Params.Values['RES']) end; end; Quote
erich.wanker Posted July 12, 2016 Posted July 12, 2016 i hope this helps .. not Mobile - but same thing .. UniHTMLFrame1.HTML.Append(' <div class="xxx"'); UniHTMLFrame1.HTML.Append(' onclick="javascript:ajaxRequest(MainForm.form,''STRUKTURNAVIGATOR'',[''param0='+my_Query.FieldByName('INR').AsString+''',''param1='+mainform.strukturtabelle+'''])">'); UniHTMLFrame1.HTML.Append('</div>'); procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TStrings); begin if EventName='STRUKTURNAVIGATOR' then begin userscore.Caption:=Params.Values['param0']; end; ... Example for your LIST-ELEMENT <li>CAPTION <a href="#" title="Buy on Amazon" target="_blank"><img src="img/basket.png" height="16" width="16" alt="Buy" class="buy" onClick="javascript:ajaxRequest(MainForm.form,''STRUKTURNAVIGATOR'',[''param0='+my_Query.FieldByName('INR').AsString+''',''param1='+mainform.strukturtabelle+'''])"></a></li> change the "onClick"- to your needs Quote
molla2005b Posted July 12, 2016 Author Posted July 12, 2016 thanks a lot. it work for me 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.