Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 6 made on Saturday December 15, 2007 at 12:35
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
You can email it but I'm in the middle of doing something else at the moment and will try to get to it in a couple of days. If it's not something simple, I'll let you know and if you want me to fix, we can discuss options offline.

What you are attempting to do is plain javascript. I suspect that some of your logic elsewhere may be updating that label to a non-numeric value which, when it does, you lose the value of your counter.


What happens if you change ?
from:
counter++
to:
counter = 1 + counter;

How about storing counter into its own field name in the widget w instead of using w.label?

You have to remember that widgets are javascript objects too. That is, you can add your own fields to them with a few side-effects. All you have to worry about is that your fields are persisted across multiple calls to CF.widget() or GUI.widget().

var w = CF.widget('blah');
w.myCounter = 0;
w.label = w.myCounter;

Now, label can operate independently from the field myCounter...

Last edited by Lyndel McGee on December 15, 2007 12:43.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse