cancel
Showing results for 
Search instead for 
Did you mean: 

finish-button onclick handler

kerem
Champ in-the-making
Champ in-the-making
Hi!

I want to add an onclick event handler to the finish command-button in the wizard/container.jsp. I do not want this action to fire for all wizard pages.
Can I put some elements in the xml config and attach an onclick handler as it is in the dialog pages. Any other suggestions?
1 REPLY 1

gavinc
Champ in-the-making
Champ in-the-making
The 'onclick' handler in dialog config is only for additional buttons that can be configured for dialogs, it does not apply to the finish button.

However, there is a way, you add the JS function handler for the onclick event when the page loads. There are a few examples of doing this in the web client, for example, have a look at /jsp/content/create-content-wizard/details.jsp, it has the following line:

document.getElementById("wizard:finish-button").onclick = function() {finishButtonPressed = true; clear_wizard();}