1. Please take 30 seconds to register your free account to remove most ads, post topics, make friends, earn reward points at our store, and more!  
    TalkBass.com has been uniting the low end since 1998.  Join us! :)

Help beginning programming

Discussion in 'Off Topic [BG]' started by Bardolph, Aug 20, 2005.

  1. Bardolph


    Jul 28, 2002
    Grand Rapids, MI
    I'm just getting into programming and reading this book on how to do it. As an example, for the first program it has you type this and save it as an html file:

    document.write("I think therefore I am");

    Then you open it in your web browser and it's supposed to display the text "I think therefore I am." I tried it out and it just displays all the code as is. What isn't being done right?
  2. bassman314

    bassman314 I seem to be a verb, an evolutionary process...

    Mar 13, 2005
    Bay Area, CA
    no.. the text should be "hello world"

    Then it should work fine :D

    Anyway, I tried it, and it does work...

    Make sure you have scripting enabled in your web browser
  3. Bardolph


    Jul 28, 2002
    Grand Rapids, MI
    I made the program in microsoft word, does that make any difference? It still saved as an html file. Here's the funny thing- I downloaded all the example programs from a website the book referenced. I opened the same exact program and it worked, so scripting is enabled on my browser.
  4. Joe Turski

    Joe Turski

    Jul 29, 2003
  5. syciprider

    syciprider Banned

    May 27, 2005
    Inland Empire
    Ah, there lies the problem. Everybody knows that true HTML geeks use Notepad.
  6. threshar


    Jul 30, 2002
    You need to make that a plain text file.
    use notepad not word.

    good luck.

    btw html is not programming. JS gets you partial credit though.
  7. Trevorus


    Oct 18, 2002
    Urbana, IL
    And be sure to save it as a .html file in notepad, not a .txt. That would make a difference
  8. Bardolph


    Jul 28, 2002
    Grand Rapids, MI
    Ah yes, much success now with notepad. So why does Word offer .html as one of the extensions if it doesn't really save it as a working .html file?
  9. threshar


    Jul 30, 2002
    It is so you can make a document in word and export it as html keeping [some of] the styles.

    The HTML word produces is awful. God awful terrible. Beat you in the head awful :)

    But good luck in learning. Programming is a horrible, horrible beast you cannot get away from.
  10. nonsqtr

    nonsqtr The emperor has no clothes!

    Aug 29, 2003
    Burbank CA USA
    Word puts "extra code" into the files that you save.

    Even if you just save a single line of text, and you thereafter examine the file, (with an "octal dump" or something), you'll find that there are headers and trailers that will completely corrupt your HTML.

    The trick is to use a different Microsoft product (thanks, MicroSlop, for forcing us to buy more of your technology) - but anyway, if you use some of the other MS products, you'll probably get better results.

    What kind of OS are you running, and who's your ISP?
  11. Yeah, avoid Word for HTML. In fact, avoid any HTML creation software either. The best way to do it is to do it in Notepad.

    Hmmm, what exactly is the type of script referenced when you use a <script>? I know when you use Javascript, for example, you need to specify withing the script brackets that it's Javascript.
  12. bassman314

    bassman314 I seem to be a verb, an evolutionary process...

    Mar 13, 2005
    Bay Area, CA
    Naaah Dreamweaver ain't so bad...

    If you start creating sites with more than 5 pages, editors are nice for templating... need to change one thing... on 43,000 pages? change the template.. bam your done...

    FrontPage and Word? suck... :spit: