Javascript

Cookiechoices cookie only set for specific page not whole website

<p>When I first downloaded the <span>cookiechoices.js</span> file from the link suggested by Google and then installed it onto my site it didn’t really work correctly. It would display the message but when the user clicked on the ok button the Cookiechoices cookie only seemed to be getting set for that specific page, so when a second

Cookiechoices cookie only set for specific page not whole website Read More »

Remove and Add HTML element using Javascript

When creating your SAP BSP using HTML you may want to add and remove elements dynamically using JavaScript and sometimes simply setting the element to visible or not isn’t the solution you are after. Sometimes I have found that even though an element has been set to hidden its footprint is still left behind and interferes with the alignment of other fields. Yes

Remove and Add HTML element using Javascript Read More »

Hide and display HTML element using Javascript

Within the JavaScript of your SAP BSP application or standard web page it is very simple to toggle a HTML element between hidden and display mode using the visibility attribute. You would just reference the elements ID and set the visibility attribute to ‘hidden’ or ‘visible’, see example below. HTML Code: <a id=”myBackButton” href=”?OnInputProcessing(goback)” class=”myButton”  >Back to Index</a> JavaScript Code: document.getElementById(‘myBackButton’).style.visibility = ‘hidden’; or document.getElementById(‘myBackButton’).style.visibility = ‘visible’;

Hide and display HTML element using Javascript Read More »