cancel
Showing results for 
Search instead for 
Did you mean: 

Keeping Users Informed

Former Member
0 Kudos

Hi

I am trying to add a facility to an App to inform users of progress, but I can't get it to work. Here is what I am trying


<javascript>
infoarea.innerText = "Loading..."
myApplet.updateGrid(true)

function myApplet_Updated()
{
infoArea.innerText += "Done"
}
</javascript>

Which I think should

1) Load infoarea with "Loading..."

2) Update the applet

3) Add "Done" to infoarea

What actually happens though is the applet is updated then infoarea is set to "Loading...Done".

The point is that some applets can take quite a while to load, and users being users they get fed up and start clicking things randomly...

Does anyone have a solution?

Thanks

Nick

Accepted Solutions (1)

Accepted Solutions (1)

sufw
Active Participant
0 Kudos

Hi Nick,

I'm assuming you're running this in IE.

I have played with that quite a lot as well and it seems that while the applet is updating, the browser does not actually re-render/repaint the other page areas. You may have some luck by executing the "Loading..." JS call before calling the update method of the applet, but I found that this isn't always reliable... If you try a different browser (e.g. Firefox), this may actually work!

One work-around which seems to work reliably is the following:

var chartApp = document.getElementById("chartAppletId");
var chartObj = chartApp.getChartObject();
var oldTitle = chartObj.getTitle();

chartObj.setTitle("Loading...");
chartApp.updateChart(true);
chartObj.setTitle(oldTitle);

Good luck,

Sascha

Former Member
0 Kudos

Hi Nick,

I was also struggling with the problem that the browser does not render visible changes while it is running javascript. I think the browser is single threaded. I used setTimeout to break the javascript into two pieces. I can't seem to post the code... Argh..

So, the function that runs on the button click, or whatever, do the message to the user, disable buttons, hide content, etc. Last line in function is setTimeout that executes the applet function.

The applet function does the applet control stuff then changes the message, enables buttons, unhides content, etc.

This works great for me.

--Amy Smith

--Haworth

jcgood25
Active Contributor
0 Kudos

Maybe all of the users would be happy if they had the WebDynpro 'swirlybird' icon to mesmerize them while it was working

In most cases a bit of user training goes a long way, whereas hackaround solutions can get messy and in some cases make the screen perform even worse (trust me - I've seen many a case of this).

sufw
Active Participant
0 Kudos

I was waiting for the "swirly bird" to pop up in this thread

jcgood25
Active Contributor
0 Kudos

No WebDynpro here, just EP wrapped around Jive Forums

I thought the 'swirly-bird' only pops up from your custom tool bar dialogs...

sufw
Active Participant
0 Kudos

well, I never actually built the bird; I'm not a big fan of it either...

Answers (2)

Answers (2)

Former Member
0 Kudos

I think you can write to status part of your IE, that is the buttom of the window. This will get updated to start with and during, if you have an while or some kind of loop within Javascript.

BR.

Poul.

jcgood25
Active Contributor
0 Kudos

Make your query results return faster

If you have excessive script attempting to man-handle the applets as if they were on the server side then it could actually be the application logic that is creating the extra delays.

Regards,

Jeremy