how to instantiate panel each time - firefox

in order to have a panel with dynamic content according to the content of active tab, I'm bootsrapping angularJs, invoking a controller then setting contents by services that get data from an online API.
How can I configure the panel to instantiate every time it's gonna open?

Firefox doesn't instantiate the panel each time you click of action button, unlike the Chrome and Safari. but a show message can be sent transmitted between main script and content script to trigger functions when popup opens

Related

Local storage event listener not working in Firefox

I have a sandbox iframe which is hosted by various websites. Lets assume that this iframe is loaded like this:
'src="https://example.com/wie.js"' I have already added 'allow-scripts allow-forms allow-modals allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-storage-access-by-user-activation' at sandbox. I also use document.requestStorageAccess() from inside the iframe and I set event listeners for the storage like this:
window.addEventListener('storage', onStorageFunc, false);.
From the iframe a popup window is presented when user clicks a specific button and the popup opens at lets say at this url "https://paypal.com". After user navigation on popup, paypal at the end of the flow redirects user to this url "https://example.com/success". At this point when user is navigated to /success I add some data to local storage which I expect to trigger the storage event listener and the onStorageFunc to run.
This doesn't happen, while in other browsers it works as expected.
Since both popup and iframe are under the same url (https://example.com) and I have used requestStorageAccess, I would expect this to work normally. Can you please help me to find out what is going wrong here? In the past I had the same problem but it was fixed when I added 'requestStorageAccess' and 'allow-storage-access-by-user-activation'. Now I can see it happening again.

Wicket: Modal Windows and callback functionality

I have a modal window that shows a panel which contains a form that has some textfields and a submit button
on submit an insert into the database occurs and then I have some ajax behaviour that i want to activate on the modal windows containing page on click of the button.
So flow is at present:
click link
modal window appears
user fills out form
user submits form
form data persisted to db
modal window closes
I need it to do this in addition:
activate some ajax behaviour on the page that contains the panel
any help on how best to do this in the wicket way is appreciated.
I resolved this by passing an instance of the page containing the panel to the panel (i.e. - in the constructor), then calling a method on the page from the panel to perform the Ajax update.
I would be interested to see what others have done or to hear if there are issues with the approach I have taken.
Set up a WindowClose callback.
In the WicketStuff project called ModelX (Disclaimer: I'm the developer of that) I have created an IWindowClosedListener interface which has a method:
void windowClosed(Panel panel, AjaxRequestTarget target)
So then any Page or Panel that can open a modal that needs to do something when that modal is closed simply implements that interface and its windowClosed method gets called at the right time.

2 way communication between WebControl and Win32/MFC

I am working on a win32/MFC application; in this application I have embedded WebControl on dialog.
when application is launched then it will load web page, in that user will enter some fields and then press submit button.
Once user presses the submit, then server will process that data and displays some unique ID to user.
Now our requirement is, we don’t want to display that unique ID on the web page instead, that web page needs to send that data to our client application(Win32/MFC).
To do this I found a solution:
Calling C++ function from JavaScript script running in a web browser control
is this is the right way to do it or is there any other solution is there.
Please help me to solve this problem
Override OnGetExternal (or if you host in your own window, change your IDocHostUIHandler::GetExternal implementation) and return a pointer to a CComTarget that has an appsubmit method exposed via automation. Change the web page to add an onsubmit handler that calls your method with the value of a hidden field
return window.external.appsubmit(uniqueId);

Delphi Chromium - how get data of Ajax call when a button/link is clicked

I'm using Delphi Chromium component in an application to show web pages from a Web Application.
In these pages I have buttons that fire selective Ajax calls to Web Server.
I need the following thing:
when one of these buttons is clicked, after notification of event to 'host application' I should want from this notification to get data of Ajax request (and response too, if possible...) to do some processing on them from 'host application'.
Is it possible ?
The extension (the TCefv8HandlerOwn class) is in fact just a JavaScript function which fires the TCefv8HandlerOwn.Execute (where you can get or set its parameters) when it's called from somewhere in the script.

How can I set up login using Fancybox?

I am trying to open a control panel in FANCYBOX.
I have a form in my page which its action and field names are same as another website and once user submit it they will redirect to their control panel in that website in a new window.
What I want is to open it in fancybox. I do not want to user leave my page, I just want them to access to that panel inside my website.
And also I want to all links of the opened frame target be _parent. I mean if they go to different parts of their panel it shows in the same fancybox not open a new window.
You might wanna look at iframe i.e. Add class='iframe' to a link check it on this page.

Resources