MOGSY Posted November 14, 2020 Share Posted November 14, 2020 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 Link to comment Share on other sites More sharing options...
andyhill Posted November 15, 2020 Share Posted November 15, 2020 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 Link to comment Share on other sites More sharing options...
MOGSY Posted November 15, 2020 Author Share Posted November 15, 2020 Thank you very much Andy. Link to comment Share on other sites More sharing options...
MOGSY Posted November 15, 2020 Author Share Posted November 15, 2020 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. Link to comment Share on other sites More sharing options...
Sherzod Posted November 16, 2020 Share Posted November 16, 2020 On 11/14/2020 at 6:21 PM, MOGSY said: urlFrameLink.zip 8.41 MB · 6 downloads Hello, We will check your testcase. Link to comment Share on other sites More sharing options...
Sherzod Posted November 16, 2020 Share Posted November 16, 2020 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); } } 1 Link to comment Share on other sites More sharing options...
andyhill Posted November 16, 2020 Share Posted November 16, 2020 Yes, that does the trick. Link to comment Share on other sites More sharing options...
MOGSY Posted November 16, 2020 Author Share Posted November 16, 2020 Hi Sherzod / Farshad excellent, sorted, thank you. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now