Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
How to get user input in BeforeSelectedTabChange to decide stay on tab or not?
posted

Hi,

I am new to Ultrawebtab. I have a requirement to display a popup when the user clicks on another tab. I'm using a div to show the popup. This popup has three buttons: yes, no, cancel. Am displaying the popup using jquery In the clientside event BeforeSelectedTabChange.  

Based on any of the three buttons clicked, i have to decide whether stay on the tab or not.

If 'cancel' button is clicked, I want to restrict the event by using the code oEvent.cancel = true;

For 'Yes' and 'No' buttons, it should move to the tab clicked. 

 

function UltraWebTab_BeforeSelectedTabChange(oWebTab, oTab, oEvent) {

   showDialog('myPopup');

// if cancel button or close(X) on the popup clicked.   

oEvent.cancel = true; 

// else oEvent.cancel = false;

  }

 

function ClosePopup() {

        closeDialog('myPopup');  return false;    }

 

 

function showDialog(id) {

        $('#' + id).dialog("open");    }

    function closeDialog(id) {

        $('#' + id).dialog("close");    }

 

 

please see the popup button code for the button

<asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClientClick="return ClosePopup();" />

Setting a value based on the user input is okay? But the user may not click the button soon like that.. 

Any help anyone could produce would highly be appreciated.

 

Many thanks

Ratheesh

Parents Reply Children
No Data