Hello everyone,
I'm doing an integration between Oracle Forms and Oracle Apex (I'm running an apex app inside Oracle Forms via FX Webview). We've been able to capture the submit and click events and I'm using the a custom "Side Navigation Menu" template to try and override the button that does the expand/collapse that shows the full side navigation bar or the collapsed one were only the icons of the buttons are shown. Basically I would like to override this behavior as I'm doing a Dashboard with charts which takes the whole window as if this apex app is the MDI window in forms and so I would like to override the button behavior to NOT collapse the Side Navigation Bar and instead I just want to change the value on a variable for example (show_dashboard = Y or N) so when I click the button the value of the this variable will be change to actually resize the Web View window in Oracle Forms to just show the complete Size Navigation Bar and the Charts will be hidden and if clicked again, then the window will be resize once again to show the whole page.
I have found a link Hide Side Navigation Menu using tree widget function not triggering click but this only collapses the Side Navigation Bar. Using the same code I tried overriding the click even of the button to throw an alert and I get alert however the default behavior of the button still keeps happening and that is what I actually would like to stop.
Bellow you can find the javascript code I use trying to override the behavior of the #t_Button_navControl button. Any help on how to accomplish this would be highly appreciated.
P.S. If there is a way to just add new button there instead and hide the existing button with ($("#t_Button_navControl").hide(); that would also work for me.
apex.jQuery('body').addClass('t-PageBody--leftNav');
//auto hide nav menu
$(window).on("theme42ready", function () {
$("#t_Button_navControl")[0].onclick = null;
$("#t_Button_navControl").click(function(){
alert("Testing");
return;
});
});