Hi I need to capture the event that triggers a popup when it is closed, for example in tickets i need to get the account that the user has selected after the popup closes, sorry about my english, it's not my mothertongue language, thanks to everyone
In vTiger, every action passes through index.php which vtiger treats as a front controller OR you can find the repective JS file inside repective module folder inside web folder.
Related
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.
I'd like to know if there is a way to open another webpage in new window just like it was in 4.0 and 2011 from sitemap button. I know that i can call webresource with javascript in it taht will open webpage but in that case after opening webpage in new window it leaves me with empty page as current and because of that it's not an option.
Kind regards,
JD
You'll have to go the web resource route. After it calls window.open, you could then have the original window navigate to the home page. So, after calling window.open, the web resource would do something like this:
parent.window.location.href = "https://yourorg.crm.dynamics.com/main.aspx";
Update based on your comment
To have the user taken back to the previous page, do: window.top.history.back()
I am developing an IOS application with phonegap and need to set local notification for it
Once user click on "view" button need to transfer the apps control to user specified page other than "index.html"
Since PhoneGap doesn't include currently this functionality, I'll assume your are using the LocalNotification plugin from Greg Allen & Drew Dahlman.
If you notice when you make the call to register the notification: plugins.localNotification.add() there are 2 parameters: "background" and "foreground" that contain javascript code to run when the app gets notified (in your case because it was in the background and you hit the "View" button).
Now, instead of using "app.background()" as in the example, you could pass there a Javascript code that navigates to the page you want to (or place your code in the background() function of the "app" object by editing the plugin file init.js.
For this to work make sure you have the implementation of the method didReceiveLocalNotification that comes with the plugin in the their modified AppDelegate.m class.
I have a website with "things" that you can create, edit, and delete inside the dashboard (specific to each user). When viewing a certain item in the dashboard, you can choose to delete it or edit it. I want to have a button that allows for delete, followed by a confirmation box ("are you sure you want to delete").
What is the most best way to set this up? Do I create a form with hidden values and the confirmation window will submit the form? Do I create a button with a link for a GET request that deletes it on the server side? (http://domain.com/delete?id=5). This is more a question about how the client and server should interact in this manner? Any help would be appreciated.
Make delete as link and then call php script that delete this thing
I am trying to use MVVM light messaging to send a value from one page to another during Navigation (for example, send the id of an item that was selected to an edit page). So the list page's viewmodel sends a message and then sends a navigation message to the view which redirects to the edit page. The edit page's viewmodel gets created only when the navigation to the page happens. So when I register for this event in the edit page viewmodel, I never get the message? What is the best solution for this?
Thanks in advance.
Your best solution would be to use the querystring instead of messaging. If you don't use the querystring, you'll have to deal with situations like the application being deactivated (tomestoned), then the user clicking "back" and your application loads the second page without receiving the message.
However, if you want to continue down this path, you can modify your ViewModelLocator such that your page's ViewModel is created immediately (in ctor for instance) instead of as needed. Since the ViewModelLocator is created as soon as your App.xaml is loaded, you know that any view models will be created immediately. As long as your view model is registering for messages in it's constructor it should receive the message.