Jump to content

ajaxRequest Problem


freedowsRoO

Recommended Posts

1 hour ago, Sherzod said:

In this case. And with our solution, you can use it like this.

1. For example, you can use a combobox for select the another component id.


  ...
  YourMainButton.JSInterface.JSAssign('screenshotObjId', [YourCustomComponent.JsID]);
  ...

2. 


function click(sender, e, eOpts) 
{
    html2canvas(document.getElementById(sender.screenshotObjId), {
        dpi: 144
    }).then(function(canvas) {
        var ctx = canvas.getContext("2d");
        ctx.webkitImageSmoothingEnabled = false;
        ctx.mozImageSmoothingEnabled = false;
        ctx.imageSmoothingEnabled = false;
        var myImage = canvas.toDataURL("image/jpeg,1.0");
        ajaxRequest(sender, "getData", ["base64Data= " + myImage]);
    });
}

 

Sorry, it works but the problem continue =(

The uniSession.SendFile still send a lot of files to save like if i had a loop im my function.

 

I think the problem is not in the function, I think is some problem with the uniSession.SendFile command because in the second time that i click de button the Event is call just one time but de UniSession.SendFile keep send the file BEFORE the AjaxEvent be call in delphi.

 

There is a way to clear the cache or buffer of the session?

 

SendFile with clientEvents.rar

Link to comment
Share on other sites

  • 4 months later...
  • 1 year later...

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