Jump to content

Recommended Posts

Posted

what the problem in This code.Callback url not work.

Download 

Multi-level-Vertical-Accordion-Menu-Plug

 

//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;
Posted

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

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...