Skip to Content

BSP : Calling script on onClientClick - how to get the result event?

Hi All

In my application (BSP) there is a new button created which calls a javascript "Script_DS()":

<htmlb:button id = "RelLockButton"

design = "emphasized"

text = "Unlock shift report"

tooltip = "<%= tool_tip %>"

disabled = "<%= unlock %>"

onClick = "OnInputProcessing"

onClientClick = "htmlbevent.cancelSubmit=!Script_DS('<%= shopflr %>')" />

The calling script open a new window "RelConfirmation.htm" using:

function Script_DS(args)


var settings = 'dialogHeight: 190px; dialogWidth: 380px; dialogTop: 500px; dialogLeft: 500px; edge: Raised; center: Yes; help: No; resizable: No; status: No; toolbar: No; menubar: No; scroll : no';

var arg = new Object();

arg.val = args;

var return_detail = window.showModalDialog('RelConfirmation.htm',arg, settings);

if (return_detail != null)


return true;


return false;


The window "RelConfirmation.htm" just has some text displayed and a button "confirm" or "Cancel" button....Since some of the validation in the main page "Main.htm" from where the page RelConfirmation.htm called are dependant on the user selection (either "confirm" or "Cancel" ) there is a need for me to retrieve the user selection back to the main page....can u please advise on how to handle this?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Jul 13, 2015 at 09:53 AM

    Hello Prabhu S

    You can use the BSP-Tag in your main page " Main.htm" to generate a javascript function which can be triggered by the dialog " RelConfirmation.htm" depending on the button pressed by the user (by using the opener reference to access the main page). This javascript function will trigger a HTMLB event that can be handled by your application. You can define up to three parameters for the generated javascript function whose values will be passed to the HTMLB event.

    The parameter "onClick = "OnInputProcessing"" of the button is not needed anymore then.



    Add comment
    10|10000 characters needed characters exceeded