Re: Problem implementing countdown timer

2006-12-20 Thread D&J Gredler

Not moving makes them easier to hit with a railgun, though!

On 12/20/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:


God damn campers. ;)

On 12/20/06, Daniel Jue <[EMAIL PROTECTED]> wrote:
> Daniel,
>
> As an avid eBay user, I've been eagerly awaiting a feature like this!
> Now everyone can be a sniper. =)
> Now we just need some suspense music that streams in the background...
>
> Dan
>
> On 12/18/06, Leffel, Daniel <[EMAIL PROTECTED]> wrote:
> > I have a really simple app that I'm trying to build. Shown on a page
is
> > an object that expires within 20-60 seconds. Once it expires, a new
> > object is created with the same time to live (and so on and so on).
The
> > current object is loaded through a Tacos AjaxAutoInvoker.
Additionally,
> > I'm using the Tacos form submit on the page to enable users to
> > manipulate the object.
> >
> > I'm trying to implement a countdown that shows in real time how many
> > seconds are left until the object expires. I tried using another
> > AjaxAutoInvoker without specifying a listener, but it makes an AJAX
call
> > anyway. I don't want to cause an AJAX call to happen every second to
> > simply decrement the counter (the AjaxAutoInvoker otherwise refreshes
> > the object every 5 seconds). So, I tried a little bit of Javascript.
The
> > problem is, this Javascript causes the AjaxForm to be submitted in a
> > non-AJAX way (Debug message is: XMLHTTP Transport Error:0). Any ideas
on
> > the best way to accomplish this?
> >
> >
> > 
> > var now = new Date();
> > var seconds = (event - now) / 1000;
> >
> > ID=window.setTimeout("update();", 1000);
> > function update() {
> > now = new Date();
> > seconds = (document.getElementById('ends').innerHTML-now)/1000;
> > seconds = Math.round(seconds);
> > document.getElementById('countdown').innerHTML = seconds;
> > ID=window.setTimeout("update();",1000);
> > }
> > 
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Problem implementing countdown timer

2006-12-20 Thread Jesse Kuhnert

God damn campers. ;)

On 12/20/06, Daniel Jue <[EMAIL PROTECTED]> wrote:

Daniel,

As an avid eBay user, I've been eagerly awaiting a feature like this!
Now everyone can be a sniper. =)
Now we just need some suspense music that streams in the background...

Dan

On 12/18/06, Leffel, Daniel <[EMAIL PROTECTED]> wrote:
> I have a really simple app that I'm trying to build. Shown on a page is
> an object that expires within 20-60 seconds. Once it expires, a new
> object is created with the same time to live (and so on and so on). The
> current object is loaded through a Tacos AjaxAutoInvoker. Additionally,
> I'm using the Tacos form submit on the page to enable users to
> manipulate the object.
>
> I'm trying to implement a countdown that shows in real time how many
> seconds are left until the object expires. I tried using another
> AjaxAutoInvoker without specifying a listener, but it makes an AJAX call
> anyway. I don't want to cause an AJAX call to happen every second to
> simply decrement the counter (the AjaxAutoInvoker otherwise refreshes
> the object every 5 seconds). So, I tried a little bit of Javascript. The
> problem is, this Javascript causes the AjaxForm to be submitted in a
> non-AJAX way (Debug message is: XMLHTTP Transport Error:0). Any ideas on
> the best way to accomplish this?
>
>
> 
> var now = new Date();
> var seconds = (event - now) / 1000;
>
> ID=window.setTimeout("update();", 1000);
> function update() {
> now = new Date();
> seconds = (document.getElementById('ends').innerHTML-now)/1000;
> seconds = Math.round(seconds);
> document.getElementById('countdown').innerHTML = seconds;
> ID=window.setTimeout("update();",1000);
> }
> 
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem implementing countdown timer

2006-12-20 Thread Daniel Jue

Daniel,

As an avid eBay user, I've been eagerly awaiting a feature like this!
Now everyone can be a sniper. =)
Now we just need some suspense music that streams in the background...

Dan

On 12/18/06, Leffel, Daniel <[EMAIL PROTECTED]> wrote:

I have a really simple app that I'm trying to build. Shown on a page is
an object that expires within 20-60 seconds. Once it expires, a new
object is created with the same time to live (and so on and so on). The
current object is loaded through a Tacos AjaxAutoInvoker. Additionally,
I'm using the Tacos form submit on the page to enable users to
manipulate the object.

I'm trying to implement a countdown that shows in real time how many
seconds are left until the object expires. I tried using another
AjaxAutoInvoker without specifying a listener, but it makes an AJAX call
anyway. I don't want to cause an AJAX call to happen every second to
simply decrement the counter (the AjaxAutoInvoker otherwise refreshes
the object every 5 seconds). So, I tried a little bit of Javascript. The
problem is, this Javascript causes the AjaxForm to be submitted in a
non-AJAX way (Debug message is: XMLHTTP Transport Error:0). Any ideas on
the best way to accomplish this?



var now = new Date();
var seconds = (event - now) / 1000;

ID=window.setTimeout("update();", 1000);
function update() {
now = new Date();
seconds = (document.getElementById('ends').innerHTML-now)/1000;
seconds = Math.round(seconds);
document.getElementById('countdown').innerHTML = seconds;
ID=window.setTimeout("update();",1000);
}


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem implementing countdown timer

2006-12-18 Thread Jesse Kuhnert

It's hard to tell what's going wrong without seeing exactly how all of
the interactions are happening but can quite confidently say that this
would be much easier to do in tapestry 4.1.1 . Ie:

http://tapestry.apache.org/tapestry4.1/javascript/form.html
tapestry.form.submitAsync();

I'd probably even go so far as to use a Timer object to do the
repeated calls for me:
http://trac.dojotoolkit.org/browser/trunk/src/lang/timing/Timer.js

var timer=new dojo.lang.Timer(1000);
timer.onTick=update();
timer.start();

Besides that, we'd probably really have to see what "update()" is
doing to say for sure what the problem is.

On 12/18/06, Leffel, Daniel <[EMAIL PROTECTED]> wrote:

I have a really simple app that I'm trying to build. Shown on a page is
an object that expires within 20-60 seconds. Once it expires, a new
object is created with the same time to live (and so on and so on). The
current object is loaded through a Tacos AjaxAutoInvoker. Additionally,
I'm using the Tacos form submit on the page to enable users to
manipulate the object.

I'm trying to implement a countdown that shows in real time how many
seconds are left until the object expires. I tried using another
AjaxAutoInvoker without specifying a listener, but it makes an AJAX call
anyway. I don't want to cause an AJAX call to happen every second to
simply decrement the counter (the AjaxAutoInvoker otherwise refreshes
the object every 5 seconds). So, I tried a little bit of Javascript. The
problem is, this Javascript causes the AjaxForm to be submitted in a
non-AJAX way (Debug message is: XMLHTTP Transport Error:0). Any ideas on
the best way to accomplish this?



var now = new Date();
var seconds = (event - now) / 1000;

ID=window.setTimeout("update();", 1000);
function update() {
now = new Date();
seconds = (document.getElementById('ends').innerHTML-now)/1000;
seconds = Math.round(seconds);
document.getElementById('countdown').innerHTML = seconds;
ID=window.setTimeout("update();",1000);
}


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem implementing countdown timer

2006-12-18 Thread Leffel, Daniel
I have a really simple app that I'm trying to build. Shown on a page is
an object that expires within 20-60 seconds. Once it expires, a new
object is created with the same time to live (and so on and so on). The
current object is loaded through a Tacos AjaxAutoInvoker. Additionally,
I'm using the Tacos form submit on the page to enable users to
manipulate the object.

I'm trying to implement a countdown that shows in real time how many
seconds are left until the object expires. I tried using another
AjaxAutoInvoker without specifying a listener, but it makes an AJAX call
anyway. I don't want to cause an AJAX call to happen every second to
simply decrement the counter (the AjaxAutoInvoker otherwise refreshes
the object every 5 seconds). So, I tried a little bit of Javascript. The
problem is, this Javascript causes the AjaxForm to be submitted in a
non-AJAX way (Debug message is: XMLHTTP Transport Error:0). Any ideas on
the best way to accomplish this?



var now = new Date();
var seconds = (event - now) / 1000;

ID=window.setTimeout("update();", 1000);
function update() {
now = new Date();
seconds = (document.getElementById('ends').innerHTML-now)/1000;
seconds = Math.round(seconds);
document.getElementById('countdown').innerHTML = seconds;
ID=window.setTimeout("update();",1000);
}


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]