try to put a question for javascript - don`t beat me

J

Jan Faerber

When you use javascript
you can use something like

if (question == true) { make something }
or better:

for(i = 0; i < 10; i++) { ...

With Java you can do something like

if (question == true) {
if (..) { .. }
elseif (..) { .. }
}

or

for(...) {
if (..)
..
}

I get an error when I try to encapsulate some brakets {} with javascript.
Is that so?
 
J

Jeffrey Silverman

I get an error when I try to encapsulate some brakets {} with javascript.
Is that so?

Huh?

Please post the exact code that gives an error, as well as the error
itself.

thanks
 
J

Jan Faerber

Jeffrey said:
Huh?

Please post the exact code that gives an error, as well as the error
itself.

thanks

My main problem was the 'elseif' ... It has to be an 'else if'.
But anyway - http://213.47.90.11/alt.html/code2.html - I can view it with
Konqueror up to 'h < 8' but not with Mozilla.

I got a tip now - check the type and the language attributes.
What is correct?
language="javascript1.1" type="text/javascript" ?

so -- now I did a restart. My browser had a hang up.
It works now.
Thank you very much Jeff!
 
M

Michael Winter

[snip]
I got a tip now - check the type and the language attributes.
What is correct?
language="javascript1.1" type="text/javascript" ?

<script type="text/javscript">

Don't use the language attribute. Not only is it deprecated, but
specifying a version is unnecessary and can result in unexpected behaviour.

[snip]

Mike
 
J

Jan Faerber

Michael said:
<script type="text/javscript">

Don't use the language attribute. Not only is it deprecated, but
specifying a version is unnecessary and can result in unexpected
behaviour.


So - and why is it better to use DHTML?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top