Execute custom javascript function on refresh button click in of Kendo upload control - kendo-asp.net-mvc

I have been using the Kendo Upload control, in one of my project.
Once I hit the upload in, upload file popup, if there is any error the upload panel stay there. We display error message in another flyout which stays there for around 30 seconds.
When there is an error, there is no more upload button avaibale, in upload file popup, but we have refresh button.
What I want to do is, I want to execute a jquery function which can hide the error message.
How can I get access to refresh button event, as I do not see any event of refresh button in kendo upload.
We are using kendo mvc wrapper.

Hitting on refresh button should call your upload event.
What you can do is register for the upload event as below:
#(Html.Kendo().Upload().Name("uploadFile")
.Events(e =>
{
e.Upload("onUpload");
})
You can have then onUpload javascript function and hide your error flyout.
Note that above function will also get called on upload buttton click.

Related

How to detect a page refresh using javascript on APEX?

My goal is to do some javascript action the moment the user clicks the browser's refresh button.
I've tried:
Function and Global Variable Declaration
function pageunload(){
alert('here');
};
Execute when Page Loads
window.addEventListener('beforeunload', pageunload);
I know that the 'addEventListener' is working properly but the event is not the right one.
I have also tried to dynamic action "before Refresh", but I haven't been able to associate it to the page level, only items/regions etc.
In the page attribute you can write Javascript on Page Load which will be executed when the page is reloaded or submitted.
beforeunload is the opposite of what you want
Use the load event
Check Mohamad image
Create a dynamic action for page Load

Refresh browser after modal dialog

My application calls a modal window from the navigation bar. The modal window has a pop-up LOV where the user selects an organization they wish to view data for. As soon as the change event occurs, the page is submitted, recording the new organization id and organization name into session state. The modal dialog is then closed.
The navigation bar displays the name of the organization that is stored in session state, making it simple for the user to tell which organization they are working with.
Since the modal to change organizations can be accessed from any page in the application, I need to be able to refresh the web browser to pick up the new organization name displayed in the nav bar once the modal has closed.
I've seen several posts online as to how to refresh a region or report once a modal closes, but I've not uncovered how to refresh the browser window, or perhaps alternatively, how to redirect back to the page where the user was when they accessed the modal via the nav bar.
How can this be achieved?
(Nav Bar displaying current context, and link to modal window)
#TineO - I was orginally thinking the same as you suggested, but the implementation wasn't coming together for me.
After further internet mining, I found this blog post which led me to a working solution, below. The bind variable :REFERRING_PAGE is a hidden field, which is populated by the link in the nav bar, using the configuration in the second image below.
You can create dynamic action or process which can work on 'click' action. You may just run 'submit page' or pl/sql or from a huge list of activities as per your need.
Hope this helps.

Generating a custom Sitecore log on a button click

Can we generate a custom log file in Sitecore on a button click() event? I know the concept of creating Sitecore custom log files on per day to day basis, but I am not able to generate the log file every time while clicking on a button.

Is it possible to create popup and exit redirect on aws S3 static website?

I just want to know if its possible to create those signup forms that popups when visitor visits the site?
And could visitors be redirected to another site once they click back or "x" button?
If you can see an html page you can include the javascript code to do that.
The javascript asociated with button click event shoul call window.location.href = "http://yourothersite.com";

Regarding stopping page reload when button clicked

I am working with Oracle Apex 4.2 where in i have a page which is Page1 and within the page i have a report region and a button. When i click on the button a Skill Builder Pop-up plugin hits up and a popup window opens up where in i created a form on another page which is Page2.
I am adding a JavaScript page refresh for Page1 and it will automatically refreshes the page at particular intervals. Code is as follows:
$(document).ready(function(){
setInterval(function(){cache_clear()},10000);
});
function cache_clear()
{
window.location.reload(true);
}
But when i click on the button, the page refresh on Page1 should stop and again it should get activated after closing the popup only.
Any help would be appreciated.
To stop process when button click use clearInterval() function.
Refer discussed thread Stop setInterval call in JavaScript
for more details.