Jump to content

Recommended Posts

Posted

Hi

Appreciate help with a problem using URLFrame or HTMLFrame. Trying to use google search, using URLFrame, search works good but the AjaxRequest not working, HTMLFrame search is not working however AjaxRequest work OK.

Appreciate help in sorting any solution. Please find attached a test app. 

urlFrameLink.zip

  • MOGSY changed the title to Google search URLFrame and HTMLFrame
Posted

I had a quick look and found:-

  //////////////////////////////////////////////////////////////////////////////

      '    function sendRequest(data) {'#10+
      '        console.log(data);'#10+
      '        //var URLFrame = Ext.getCmp(''_URLFrame'');'#10+ FAILS ???
      '        var params=[];'#10+
      '        params = ["val="+JSON.stringify(data) ];'#10+
      '        if (params.length > 0) {'#10+
      '            //ajaxRequest(URLFrame, ''findaddress'', params);'#10+ FAILS NO AJAX FUNCTIONS
      '            //ajaxRequest(MainForm.UniURLFrame1, ''findaddress'', params);'#10+ FAILS NO AJAX FUNCTIONS
      '        }'#10+
      '    }'#10+
At least data now goes to console.

  //////////////////////////////////////////////////////////////////////////////

Knowing that ajaxRequest is not implemented I thought you could use:-

  s:= 'ajaxRequest=function ajaxRequest(sender, url, data)'#10+
      '{'#10+
      '}';

  UniURLFrame1.ClientEvents.UniEvents.Add(s);

But need help from Sherzod to implement MainForm.UniURLFrame1, ''findaddress'', params

Posted

Hi Sherzod / Farshad

Is it possible to implement Ajaxrequest fot uniURLFrame?

The issue I have the same code that works good on browser however using uniURLFrame is partially working the map works and the search is good except I can't send result back to UniGui.

The same code in  uniHTMLFrame doest work although it displays the map the search is not working.

If  Leaflet map also initialized at the same time as the UniHTMLFrame, then uniHTMLFrame works 100% and everything works well except there is an error from google complains about two maps.

It appears that UniHTMLFrame requires some additional initialization which I don't know.

Is it possible to advise how can I solve this problem.

We are so close but  need a little magic from UniGui support.

Regards and many thanks for your support.

Posted
8 hours ago, MOGSY said:

uniURLFrame

Hi,

Try with this changes:

function sendRequest(data) {
    var URLFrame = top.Ext.getCmp('_URLFrame');
    var params = [];
    params = ["val=" + JSON.stringify(data)];

    if (params.length > 0) {
        top.ajaxRequest(URLFrame, 'findaddress', params);
    }
}

 

  • Like 1

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