enipla
1
Good God -
Does Javascript use a Q instead of a G in the word language?
<script lanquage=“text/javascript”> instead of <script language=“text/javascript”>
This has cost me a week or two.
My code works with a Q. Dosn’t with a G.
wow and dammit.
:smack: :smack: :smack: :smack: :smack: :smack: :smack:
friedo
2
Doesn’t work with a Q in any universe I know about. The tag you want is
<script language="javascript">
It is not a MIME type, just the word “javascript” (you can also add a version number if you want.)
Gee, a whole week!
Try <script language=“JavaScript”>
and forget the “text/” bit.
((It’s ignoring “lanquage”))
-David
enipla
4
Really weird, but it does work with q, instead of g.
Anyway, I will get rid of the text/ part.
…
Just tried it, did the trick.
So whats up with the text/ part of the ‘language=’ attribute of the <script> tag? I see it a lot. Books, tutorials, the works.
Screwed me pretty good too.
Anyways, thanks loads…

Hey! My post didn’t go through!
The language attribute is deprecated, because of confusion just like this. You should use the type attribute instead:
<script type=“text/javascript”>
Incidentally, the whole language vs. lanquage issue really has nothing to do with JavaScript. It’s a question of HTML syntax.
Oh, now I see why my post “didn’t” go through. There’s a duplicate. Very sneaky indeed.
enipla
7
Yep, I start just using ‘type’. And your right of course, this is an HTML issue, not really Javascript.
And sorry about the duplicate post, don’t know what happend.