random message

admin

Administrator
Staff member
hi could anyone help me with the following script when rum it says unterminated string constant, but i cant find the source of the error :(<br />
<br />
<script type="text/javascript"><br />
text = new Array("Spock, will you please sit down! -- Kirk Star Trek: TMP","No, I'm from Iowa. I only work in outer space. -- Kirk Star Trek IV","Captain, life is not a dream. -- Spock Star Trek V","I need a shower. -- Kirk <br />
Sniffing, Yes. -- Spock Star Trek V","Oh, ****!!! -- Data Star Trek Generations","Smooth as an android's bottom, eh, Data? -- Riker Star Trek Insurrection","... and tell Doctor McCoy, he should have wished me luck. -- Spock The <br />
Immunity Syndrome","Nice Legs... for a human -- Worf Qpid","I am NOT a merry man!!! -- Worf Qpid","Please Mrs. Troi! ... and it's Worf not Woof -- Worf Half a Life","What do you want me to do? -- Q <br />
Die -- Worf Deja Q");<br />
document.write(text[parseInt(Math.random()*text.length)]);<br />
</script><!--content-->Originally posted by 96turnerri <br />
"I need a shower. -- Kirk <br />
Sniffing, Yes. -- Spock Star Trek V" <br />
<br />
Eliminate a space after "Kirk". When I did that, the page loaded without errors. Nothing displayed, but that's another issue. ;) <br />
<br />
Aronya1<!--content-->Did you lose your original thread (<!-- m --><a class="postlink" href="http://forums.webdeveloper.com/showthread.php?s=&threadid=17039">http://forums.webdeveloper.com/showthre ... adid=17039</a><!-- m -->)?<br />
<br />
Anyway, make sure the new Array() line is all on one line, and it should work fine.<!--content-->Yeah! THAT'S what I meant... :)<!--content-->thanks guys, nothing showed up because it is white text meant for a black background and i am presuming you were on a whith bg<br />
<br />
Rich<!--content-->So is it working for you now?<!--content-->yes its working very well thanks for you help pyro m8<!--content-->You bet... :)<!--content-->
 
Back
Top