hey guys: this might be a totally dumb question because i'm still learning things. I understand the principle of doing websites the 'right way' with web standards (CSS for Presentation/HTML for markup). And seeing how using DW/WYSWYG is not accurate and clean code. My question is, what about using DW's built-in JS behaviors? Would this also be going about it from the wrong standpoint in using JS? Is there a better accurate way to do JS 'the right way' or does it not matter from this standpoint? I hope this makes sense.
Don't use it. The code is often bloated and designed to cater to every possible situation (including Netscape 2 and Internet Explorer 3!), often relies on browser sniffing instead of object detection and often gets inlined with the HTML file. If you're going to use JavaScript (including Ajax), make sure the files are as unobtrusive as possible (meaning they are contained in external files and attached dynamically by corresponding with ID attributes or injecting custom class names into the DOM), accessible, and are written (and executed) with progressive enhancement (not graceful degredation) in mind and use the bare minimum of code to prevent memory issues.
Dan, that is reminiscent of older versions of Dreamweaver. The new versions have options to not bother supporting low end browsers (e.g. NS4), have less browser detection by user agent and not certain about this, but it can also be configured to use your external JS files. Definitely doesn't beat doing this "by hand", but it is viable for those with little JS background.
thanks for the response dan/krt. I am an artist first before a coder but i have found that learning css/html is not so 'overly technical' and i can handle that code without hindering my time and mind for creative work. Javascript by hand...oooh....i don't know. I guess I need to look into this more. Maybe check out 'Simply Javascript' by sitepoint. I appreciate the explanations. I am also working with Flash and may go towards actionscript.
I do not recommend that book. Get Jeremy Keith - DOM Scripting to learn some basic modern Javascript. The book doesn't go that deep into JS techniques, it's more of a best practices book that's friendly to beginners. After that you can read something like Chris Heilmann's Beginning Javascript and DOM Scripting (which is not as newbie friendly as Jeremy's book). It has lots more techniques though.
I'm going to second the call against "Simply JavaScript" - UNLESS - you are content being taught how to code using a JavaScript library, rather than learning how to code to the spec, then incorporating a custom library that you can reuse later. In other words, if you don't mind letting a library do all the heavy lifting while you learn the basics of the language, then yes, "Simply JavaScript" will be good enough for you. However, if you want to learn how to create your own JavaScript applications, then this book will not be for you unless you're willing to undertake a huge learning curve afterword and break away from using pre-fab custom libraries.