Skip to Content
author's profile photo Former Member
Former Member

BPS WIB - Confirm Popup with 2 options

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>

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Feb 22, 2005 at 03:30 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.