cancel
Showing results for 
Search instead for 
Did you mean: 

BPS WIB - Confirm Popup with 2 options

Former Member
0 Kudos

Hi all,

Below is the code for a confirm popup that I would like to use in conjuction with a HTML text element in my Web Planning Interface. Can you help me understand exactly how to insert a BPS WIB pushbutton function correctly into the following code?

The code offers a simple display popup with an OK or CANCEL option. My question: How would I insert and execute 2 pushbutton functions when clicking OK (the true option), and only 1 function on selecting the CANCEL options?

<html>

<head>

<script type="text/javascript">

function disp_confirm()

{

var name=confirm("Press a button")

if (name==true)

{

I WANT 2 BPS FUNCTIONS TO EXECUTE HERE....!!!

}

else

{

I WANT 1 BPS FUNCTION TO EXECUTE HERE.....!!!

}

}

</script>

</head>

<body>

<form>

<input type="button" onclick="disp_confirm()" value="Display a confirm box">

</form>

</body>

</html>

Accepted Solutions (1)

Accepted Solutions (1)

former_member93896
Active Contributor
0 Kudos

Rael,

you can not execute two planning functions within JavaScript. Combine the two functions into a planning sequence and then execute the sequence via the script.

First, here's the HTML for adding a button that looks just like the standard buttons:

<span><a href="#1" onclick="disp_confirm(); return false;" class="sapBtnStd" OnMouseOver="javascript:window.status = 'Confirm'; return true;" title=""><nobr>Display a confirm box</nobr></a></span>

To execute the function, just use a call like the following (use the technical name of the button):

bspSubmit( 'FunctButton1' );

Regards,

Marc

SAP NetWeaver RIG, US BI

Answers (0)