Hi Daniel,
I'm not sure if you are referring to the actual HTML ONLOAD parameter or the SAPBWOpenURL function call itself.
(1) To test just the HTML ONLOAD parameter, try this code. It will display a popup alert box showing some text. If the popup appears when you load this in the web browser then you know for sure the issue is not the triggering of the goto_tabX function.
- Code: Select all
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function goto_tabX(tabname) {
alert("SAPBWOpenURL(SAP_BW_URL_Get()+'&item=TABLE_*&multi=X&hidden=X&cmd_1=item%3D'+tabname+'*%26hidden%3D %26multi%3DX');");
}
//-->
</SCRIPT>
</HEAD>
<BODY ONLOAD="javascript:goto_tabX('TABLE_2');" >
</BODY>
</HTML>
(2) The call of the SAPBWOpenURL function appears to have invalid URL encoding. The space in "hidden%3D %26multi" will prematurely terminate the URL encoding of the named parameter "cmd_1". Try removing it. Like "hidden%3D%26multi".
A side question ... are you sure you want the wildcard asterisk for "tabname+'*%26hidden" as this will match "TABLE_2" and "TABLE_20"?
- Code: Select all
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function goto_tabX(tabname) {
SAPBWOpenURL(SAP_BW_URL_Get()+'&item=TABLE_*&multi=X&hidden=X&cmd_1=item%3D'+tabname+'%26hidden%3D%26multi%3DX');
}
//-->
</SCRIPT>
</HEAD>
<BODY ONLOAD="javascript:goto_tabX('TABLE_2');" >
</BODY>
</HTML>
(3) This is a handy quick reference link for URL encoding.
http://www.w3schools.com/tags/ref_urlencode.aspKind Regards,
John.