cancel
Showing results for 
Search instead for 
Did you mean: 

Web Report - Floating Navigation Area

Former Member
0 Kudos

BW Web Report, BW 3.5

I am trying to build a floating navigation area, such that the navigation area is always on top, and can be moved around by the user, but will always be on screen (similar to the demo at http://www.dynamicdrive.com/dynamicindex11/topcontent.htm).

I have managed to get this to work, the only problem I am having is when you drilldown via the navigation. When this is done, the current position of the navigation is lost, and it moves it back to the original position.

I believe that this is occurring because on the drilldown, the only section that is reloaded is the data section, not the whole page (am I correct in this assumption??). As a result, the code that I have written to position the code is not run on the drilldown, and for some reason, it is returning the navigation area to its original position.

My questions really are the following:

1. Am I correct in assuming that only the part of the web report that is changed is reloaded when you do a drilldown operation?

2. If so, is there an event that is raised that I can tap to have it call the function that repositions the navigation area?

3. Has anyone done anything similar and managed it successfully?

Thanks in advance for any assistance.

Regards

Richard

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Richard -

See comments below

1. Am I correct in assuming that only the part of the web report that is changed is reloaded when you do a drilldown operation? <b>Mostly. I've noticed before that the body onload event is not always fired when you add/remove chars to the data table. This behavior was not consistent. I think it depended on what data is in cache. I'll have to research a bit more. Also, I think this has to do with the use of bw snippet operations. I think this option can be turned off and this may force the page to reload after every navigation.</b>

2. If so, is there an event that is raised that I can tap to have it call the function that repositions the navigation area?<b> Not sure, I'll have to look into it.</b>

3. Has anyone done anything similar and managed it successfully?<b> Nope. But with the introduction of the vertical navigation block in 3.5, I've been thinking about using a sidebar, much like you see here ==> http://www.sitepoint.com/article/simple-tricks-usable-forms

Hide Nav/Show Nav can be seen in action on the left navigation area.</b>

Former Member
0 Kudos

Hi David,

thanks very much for getting back to me.

You can turn off the snippet operations by adding

&snippet_operations=

to the report url - I tried this, but it didn't seem to make any difference.

I was originally thinking along the lines of the sidebar, and that might be the way that I go, but then I started playing around with the always on top content, and thought it would be really nice - users could minimise it and/or move it out of the way when they were finished with it, but it would always be on screen for them, so it wouldn't get lost or displace any other content.

I'd appreciate you letting me know if you come up with any more info on this.

I assume that you would be able to achieve what I am trying to do by tracing the javascript used in the web templates, but I am always hesitant to make changes in the standard code, and I thought that SAP might have provided a way of raising an event on refresh or something.

Thanks again for getting back to me.

Regards

Rich

Former Member
0 Kudos

Richard -

The following code will attach an onload event to the SAP_BW_SNIPPET IFRAME . This frame is used to refresh the data in the data table web item...not sure exactly how, but it is.

var zIFrame=document.getElementById("SAP_BW_SNIPPET");

zIFrame.attachEvent("onload",zTest);

In the function zTest, you could write some code to re-position the floating nav block.

Let us know how it goes.

Former Member
0 Kudos

Excellent!!! - thanks very much for that - I'll give it a go now, and let you know how it goes!

Where did you dig up that bit of information?

Former Member
0 Kudos

Hi David,

Works like a charm!! That was just what I was looking for!

Where did you find that info? Did you end up just looking through the code, or is there some document that I need to get my hands on? I have found it very difficult to get info on how some of this stuff works in the background.

I have set this up as a web template (which can be included in other web templates as of 3.5 as you would know), so if you're interested in having a look at it, let me know, and I can email you a copy.

Thanks heaps for your help - very much appreciated!

Regards

Rich

Former Member
0 Kudos

Richard -

Glad it worked for you ! I've seen that snippets iframe before but really never thought much about it. After your question, I got to looking at the following file /sap/bw/Mime/BEx/JavaScript/JSBW_C_Std.js

I noticed the drilldown/across icons were calling the SAPBW javascript function. So, I found that in the above js file and started tracing it...

I would love to see your solution. Please send to dc24ua@gmail.com

Cheers

Former Member
0 Kudos

Hi David,

FYI, I sent through my code to your email address a couple of days ago - let me know if you haven't received it for any reason.

Thanks

Rich

Answers (0)