I'm not sure why without debugging your code. It is hard to answer these questions out of context, so I am trying my best.
I can only guess without looking at your files. My guess could be wrong.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.