Skip to Content

Introduction

Welcome to Part 2 of our look at adapting general JavaScript elements to be

BSP Custom Elements. In [Part 1 | https://www.sdn.sap.com/irj/sdn/weblogs?

blog=/pub/wlg/1104] we looked a simple example that

showed the basics of creating our custom bsp element and adapting our

JavaScript example to fit that framework. Today we are going to take one

step further and look at an example that is slightly more complex.

Today I choose a JavaScript example of a nice little WindowsXP-style

Progress Bar. Now I realize that SAP delivers a Progress Indicator element

in the PHTMLB library. The example I want to look at today works a little

different in that it is a constantly scrolling bar that doesn’t really

indicate the current percentage complete. As the author of this tools

suggests: “The bar doesn’t really do anything other than give your visitor

something to look at while the page loads”. But this example is important

because of the way that it is implemented. The bulk of the JavaScript is

contained in a .js file that must be included in the HEAD section of your

page. Then later in your page you trigger the creation of the progress bar

with another line of JavaScript. You see this type of implementation of

JavaScript functions quite often and I wanted to share my approach for

dealing with it in BSP.

The JavaScript

The example today comes from Author Brian Gosselin and the Script Asylum .  The

following is a link to the page where you can download the JavaScript file

and read a very detailed explanation of how it works.

WindowsXP Progressbar (v1.2)

I hope that everyone is enjoying these examples so far.  In the next

installment we will get really crazy and start altering the rendering of

existing SAP delivered BSP elements.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply