display information at html Status Bar

Oct 18, 2006 5 Replies

I am working with a com add-in. I created a custom button which allow user to enter information and then save to database. After it is saved, I would like to display that information in Status Bar. I have created the html page to display the data. It works fine when pos is first loaded.



Now the problem is: how to refresh the data after user enter information? Is something like fireevent I can use for this?



Another problem, when the form pop up, how to make sure it is always focused? That is, user can not click pos while the form stays open?



Many thanks



Leanne



Hi Leanne,

You can have the status page call a refresh function every certain amount of seconds -- the default RMS status screen does this through Window.SetInterval(...).

To keep the form focused in c#/vb.net call form.ShowDialog(), in VB try form.Show vbModal

- Evan Culver New West Technologies

Thanks Evan. I have a temporary variable which I stored at Sessionclass.Variable(1) and I would like to refresh that as well. Window.SetInterval() doesn't work for that. any more suggestions?

Leanne

Evan Culver wrote:

Leanne,

Once you have a QSRules object (see RMS default), you can get/set the session variable via QSRules.Session.Variable(1).

- Evan Culver New West Technologies

Evan,

Thank you for your reply. I think the window.SetInterval() doesn't work for me in this case. My code are as following:

var TimerID

function DisplayServiceName() { try { var qsRules = qsBridge.RequestQSRules(); var BatchNumber=qsRules.SessionClass.AccountingPost.BatchNumber;

txtServiceName.value ºtchNumber; // txtServiceName.value="999" } catch (err) { txtServiceName.value ="empty"; } }

function doStartup() { TimerID=window.setInterval("DisplayServiceName()", 500); }

...

...

When program started, txtServiceName always = "empty". Even when I try to set it to "999", it still doesn't work.

Can you please give more ideas?

Thanks Leanne

Evan Culver wrote:

Leanne,

Try: QSRules.Register.Batch.BatchNumber

- Evan Culver New West Technologies

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required