Finally, voting without refresh
ycombinator.com
Finally, voting without refresh
1–10 of 45 posts
Re: Finally, voting without refresh
#2Re: Finally, voting without refresh
#3Don't worry, I'm not going to post a link about each releaselet. I just wanted to thank PB for helping us.
Re: Finally, voting without refresh
#4Don't worry, I'm not going to post a link about each releaselet. I just wanted to thank PB for helping us.
Re: Finally, voting without refresh
#5Great stuff, Pauls (and Trevor).
Re: Finally, voting without refresh
#6Re: Finally, voting without refresh
#7(Not criticizing, just curious)
Re: Finally, voting without refresh
#8Re: Finally, voting without refresh
#9Does it make the request, then update the number? Or does it update the number and make the request at its leisure?
// ping server
var ping = new Image();
ping.src = node.href;
return false; // cancel browser nav
}
The clever part is in using the image object as an ajax-like connection, response isn't check, and I'm not sure if it's async. Question: is this a common javascript idiom? Is it browser portable?
Mynameishere: The answer to your question is it updates the number and makes an immediate request to the server.
Re: Finally, voting without refresh
#10Does it make the request, then update the number? Or does it update the number and make the request at its leisure?
Well, look at the code :) I did, it was educational. Node.href contains the values that are linked on the up/down arrows. // ping server var ping = new Image(); ping.src = node.href; return false; // cancel browser nav } The clever part is in using the image object as an ajax-like connection, response isn't check, and I'm not sure if it's async. Question: is this a common javascript idiom? Is it browser portable? Myn…