MOGSY Posted November 12, 2020 Posted November 12, 2020 Hi How is possible to send ajaxRequest from UniURLFrame? Regards Quote
andyhill Posted November 13, 2020 Posted November 13, 2020 Process UniURLFrame OnAjaxEvent (add Listener if necessary). Quote
MOGSY Posted November 13, 2020 Author Posted November 13, 2020 Hi How is possible to send the ajaxrequest from the HTML in uniURLFrame. It is giving errr on "Ext". How should be the function to post request from the uniURLFrame? If url used how the site should send the ajaxrequest? function sendRequest(data) { console.log(data); varURLFrame = Ext.getCmp('_URLFrame'); var params=[]; params = ["val="+JSON.stringify(data) ]; if (params.length > 0) { ajaxRequest(URLFrame, 'eventName', params); } } Thank you. Quote
Larsson Posted November 13, 2020 Posted November 13, 2020 (edited) Hi, I am actually working on the same thing today. You need a space in varURLFrame (but I guess you have that). Additionally in UniEvents function beforeInit(sender, config) { config.id = '_URLFrame'; } This is where you assign the name that you locate with getCmp. Hope it helps. It worked for me with the code you had above. Regards, Fredrik. Edited November 13, 2020 by Larsson Typo in id name Quote
MOGSY Posted November 13, 2020 Author Posted November 13, 2020 Hi Larsson Thank you for your reply, The issue I have it seems it not understanding the "Ext" and can not resolve the reference to sancha. Quote
MOGSY Posted November 13, 2020 Author Posted November 13, 2020 Hi Fredrik What you mean by 'You need a space in varURLFrame'? Regards Quote
Larsson Posted November 13, 2020 Posted November 13, 2020 53 minutes ago, MOGSY said: Hi Fredrik What you mean by 'You need a space in varURLFrame'? Regards In the pasted code you have varURLFrame = Ext.getCmp('_URLFrame'); You need to have var URLFrame = Ext.getCmp('_URLFrame'); Since you are defining a variable. Quote
MOGSY Posted November 13, 2020 Author Posted November 13, 2020 HI That is correct and the line is var URLFrame = Ext.getCmp('_URLFrame'); The space is not showing for some reason here. Same code works fine in UniHTMLFrame, however in UniURLFrame the "Ext" is not defined. 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.