cancel
Showing results for 
Search instead for 
Did you mean: 

BPS - A confirm pop-up

Former Member
0 Kudos

Hi all,

I am looking for a way to change the following pop-up code so that it calls a URL rather than a navigate function (set up in the web template builder for BPS web planning).

The popup currently will execute a navigate function upon clicking OK. I want it rather to execute a URL/hyperlink but I don't know how to change the code...

This is how it currently looks:

<script>

function SubmitWithPrompt(txtPrompt, txtStdButtonName) {

if( window.confirm( txtPrompt ) ) {

return( bspSubmit( txtStdButtonName ) );

}

}

</script>

<span><a href="#1" onclick="javascript:SubmitWithPrompt('You will lose unsaved data. If you have NOT saved your data, click CANCEL and save the data, otherwise click OK to continue.', 'Go_Home5'); return false;" class="sapBtnStd" OnMouseOver="javascript:window.status = 'Go Home'; return true;" title=""><nobr>Go Home</nobr></a></span>

The reason I want to do this is because on my web page I need to hide the navigate function so that the user is forced to click on the text element (which contains the pop-up code).

Problem is that navigate button cannot be hidden on a web page (or can they, guru's?), whereas the URL/hyperlink can be hidden by simply not putting in a description in the Text field.

Thanks in advance,

Rael

Accepted Solutions (1)

Accepted Solutions (1)

former_member93896
Active Contributor
0 Kudos

Rael,

you can hide any BPS element. Put a text element at the end of the page with the following HTML code:

<SCRIPT LANGUAGE="JavaScript">

document.all("Layout1").style.display = "none";

</SCRIPT>

Replace "Layout1" with the technical name of the BPS element.

Regards,

Marc

SAP NetWeaver RIG, US BI

Former Member
0 Kudos

Hi Marc,

I have followed your advice without success. Please just check to see if the following looks good to you:

I have a navigate function called Go_Home5 which I wish to hide. So I created a text element with HTML true and inserted the following:

<SCRIPT LANGUAGE="JavaScript">

document.all("Go_Home5").style.display = "none";

</SCRIPT>

I placed the text element (and the navigate button I wish to hide) at the end of the page and regenerated.

But the navigate button is still showing....?

Thanks Marc,

Rael

former_member93896
Active Contributor
0 Kudos

Rael,

if you just want to hide something, you don't even need a script. Add a HTML Text Component before and after the button:

Before: <!--

Button

After: -->

Regards,

Marc

SAP NetWeaver RIG, US BI

Answers (0)