kv79 Posted March 17, 2008 Share Posted March 17, 2008 Hi , on W3School I was learning when i write a code i need to write in <html> tags . <html><body><script type="text/javascript">document.write("Hello World!");</script></body></html> But when I open a basic page->JavaScript of Dreamweaver ,the product are acting like they do not know JavaScript WC3Schooland ours standard to write in HTML ,so Am i so uninformed about JavaScript or there is no any possibility to write JavaScript except into this code above .Thank for your effort of reading my message Link to comment Share on other sites More sharing options...
djp1988 Posted March 17, 2008 Share Posted March 17, 2008 if you are opening a javascript document in dreamweaver then it is only a script page, you need to open a HTML or PHP.... page and write your code between the <head> tags, or anywhere in the <body>, depends on what the code use is.Is that helpful ? Link to comment Share on other sites More sharing options...
djp1988 Posted March 17, 2008 Share Posted March 17, 2008 Otherwise you could write your script onto a javascript page (.js) and import it into what html/php pages you like by using this code: <script type="text/javascript" src="http://www.domain.com/JavaScriptDocument.js" /> Link to comment Share on other sites More sharing options...
kv79 Posted March 17, 2008 Author Share Posted March 17, 2008 Thanks . Is someone knows more? Link to comment Share on other sites More sharing options...
Jesdisciple Posted March 17, 2008 Share Posted March 17, 2008 Yeah, I advise you to not use Dreamweaver when you're first learning, for at least two reasons: When Dreamweaver makes a JavaScript file, it assumes that you already understand where, how, when, and why to put the JavaScript code. With Notepad, you're not tempted to stray from the tutorial. If you use Design mode, it can really screw up your page just like all WYSIWYGs. Note that I don't mean that your page will look horrible in a browser, but the HTML source won't be very intelligently written, and that can make it harder to edit your pages (and you might pick up some bad coding habits from it). I don't use Design mode, either, and I've been at this ... *thinks* ... about 3 years now, I think. Link to comment Share on other sites More sharing options...
Synook Posted March 17, 2008 Share Posted March 17, 2008 Well, Dreamweaver can't parse JavaScript as it only provides a preview of your page, instead of running it. Opening your page in a web browser (with run local active content enabled) will allow yoru JavaScript to run. Link to comment Share on other sites More sharing options...
pabretherton Posted March 18, 2008 Share Posted March 18, 2008 Wow this thread is filled with so many reasons to not use Dreamweaver! I'm glad I've never bothered with it...Annoyingly though - knowing dreamweaver is seen as a plus when applying for web design jobs here in Oz. Bah! Link to comment Share on other sites More sharing options...
Synook Posted March 18, 2008 Share Posted March 18, 2008 Dreamweaver's code view has some advantages (very good syntax highlighting and code completion in almost all web development languages), but WYSIWYG is never good. Link to comment Share on other sites More sharing options...
Jesdisciple Posted March 18, 2008 Share Posted March 18, 2008 To clarify, I find Dreamweaver very useful as a source editor. I don't use it for anything except to create and edit files, but I find it to be much better than the two open-source editors I found by this forum (PSPad and Notepad++ - didn't bother downloading any others). (My main complaint against them is that, if you use Ctrl+Z or Ctrl+Y too many times, they start eating code. But I also like tag completion.) Link to comment Share on other sites More sharing options...
jhecht Posted March 18, 2008 Share Posted March 18, 2008 Learn how to code something yourself, don't take the lazy way out. No offense to people who use Dreamweaver, but a retarded orangutang that knows sign language can write better valid HTML than Dreamweaver 99% of the time. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.