Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h:form>
- <ace:pushButton id="button1" action="#{someBean.someFunction1}" label="Button1" />
- </h:form>
- <h:form>
- <ace:pushButton id="button2" action="#{someBean.someFunction2}" label="Button2" />
- </h:form>
- function setTestButtonsOnclickFunctions() {
- var button1 = document.querySelector('[id*="button1_button"]');
- var button2 = document.querySelector('[id*="button2_button"]');
- button1.onclick = function() {
- button2.click();
- var someRandomVariable = 10;
- };
- button2.onclick = function() {
- button1.click();
- alert("Button1 was clicked from javaScript");
- var someRandomVariable = 10;
- };
- }
- (function($) {
- $(document).ready(setTestButtonsOnclickFunctions);
- })(jQuery);
Add Comment
Please, Sign In to add comment