Javascript issues. I have a few javascrits, some are working some are not. help please.?

Question by David P: Javascript issues. I have a few javascrits, some are working some are not. help please.?
I have the following code. It isn’t working at all. If I put in a tag I get my text saying I don’t have javascript enabled. However, I have other javascript in the page and it works fine. All scripts are built into the page, and are not being called from a separate file.

NON WORKING JAVASCRIPT

No JavaScript

WORKING JAVASCRIPT

Acronyms


By the way I’m using Google Chrome

Best answer:

Answer by Ratchetr
The Firefox error console gives this error:

Error: unterminated string literal
Source Code:
document.write(“” + status[i] + “” + ” = ” +statusR[i] + ”

You can’t split your quoted string across multiple lines like that.
If you’re trying to split across multiple lines, do this:
document.write(“” + status[i] + “” + ” = ” +statusR[i] + “
” );

Add your own answer in the comments!

Twitter Digg Delicious Stumbleupon Technorati Facebook Email

One Response to “Javascript issues. I have a few javascrits, some are working some are not. help please.?”

  1. stratsandlespauls December 29, 2010 at 10:13 pm

    I don’t see how either one would work but try replacing this line with what I have.

    document.write(“” + status[i] + “” + ” = ” +statusR[i] + “
    “);
    or
    document.write(“” + Ac[i] + “” + ” = ” +Acronym[i] + “
    “);

Powered by Yahoo! Answers