You cannot pass variables, per se, between JavaScript and PHP. However, your PHP script can certainly author JavaScript, including JavaScript variables. I hope that makes sense, because it's late and I don't feel like debugging all that code you posted. Thanks for using code tags, though!
Seriously, with your JavaScript, use PHP to simpy "echo" the JavaScript variable.
Reputation Points: 227
Solved Threads: 37
Made Her Cry
Offline 1,697 posts
since Dec 2004