I don't understand everything you said yet, but I'll study it.
Here's another question: You told me why this doesn't work; but it does work for the "you already voted" webpage which is printed by the same script. Why does it work for that page but not the "results" page?