I'm afraid since this doesn't pertain to a webassist product I'd have to get you to sign up for a premiere support ticket to help you debug your code and get this working.
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.