Unless you post your code, we can't help. We're just speculating as to what your issues are. In addition, as this will probably be a js issue, you may be better off posting to the JS forum. However, see where the issue lies - PHP or JS.
You aren't seriously asking us to download a zip file and wade through loads of code are you? If so, I think you misunderstood the nature of this forum. This is not me being shirty, just telling you that we're all volunteers and have limited time to try to help individuals like you. Somebody here may have the time, most of us won't.