Mozilla Browsers and JavaScript (Full Version)

All Forums >> [Community] >> OutFront Discoveries



Message


Giomanach -> Mozilla Browsers and JavaScript (2/12/2004 10:35:02)

This one is for all you people who aim to support all browsers with your websites. And read carefully, "I will type zis only once"

After writing a script that would work in IE NS and Mozilla for Karen/Peppergal, I have discovered that for the script to work within Mozilla etc, you do not need to enter any extra coding especially for Mozilla, all you need to do is open the script with:

<script language="JavaScript" type="text/javascript">

The language attribute is for IE and NS, the type attribute defines it for Mozilla. If it isn't entered then Mozilla will either read straight over the script, or mess it up totally.

Hope that helps all you JavaScript writers out there.

Dan




Peppergal -> RE: Mozilla Browsers and JavaScript (2/12/2004 18:33:47)

WOW. You are amazing.

And you really do only have to type it once. LOL

Thanks!




Giomanach -> RE: Mozilla Browsers and JavaScript (2/13/2004 4:20:33)

quote:

WOW. You are amazing.


Who you been talking to?? lol. I still have a lot to learn, but as I know things, I will share them. And I'm not that good, I'm only a kid! lol

Dan




Peppergal -> RE: Mozilla Browsers and JavaScript (2/13/2004 9:26:44)

You're only a kid?

But you're a smarter kid than me. LOL And I'm NOT a kid.

[:)]




Giomanach -> RE: Mozilla Browsers and JavaScript (2/13/2004 9:33:32)

quote:

You're only a kid?

Yup
quote:

But you're a smarter kid than me. LOL And I'm NOT a kid.

Don't put yourself down, your qualities lie elsewhere, I can tell you that for nothing[:D]

Dan




davids -> RE: Mozilla Browsers and JavaScript (2/17/2004 11:05:16)

Thanks for posting that. It's a good habit for people to take up anyway, since I believe that it is a requirement for validating under HTML 4.0 - even transitional.




Giomanach -> RE: Mozilla Browsers and JavaScript (2/17/2004 11:07:18)

Only if you target Mozilla 1.0 and above for your browsers, any lower and it isn't required, but I do agree, people should make a habit of it anyway

Dan




Peppergal -> RE: Mozilla Browsers and JavaScript (2/17/2004 11:46:40)

It worked like a charm!!! Thanks so much!




davids -> RE: Mozilla Browsers and JavaScript (2/17/2004 11:53:53)

No, I mean W3C validation. The Real Deal.




Giomanach -> RE: Mozilla Browsers and JavaScript (2/18/2004 3:47:05)

quote:

No, I mean W3C validation. The Real Deal.


You'll find that it isn't actually required, I use DWMX2004 to validate my pages etc, and unless I target Mozilla 1.0 and Opera, I don't get the error of "Tag SCRIPT is missing required attribute type Mozilla 1.0, Opera".

I run a target browser check and a coding validator before I upload sites, and the error only appears when I target Mozilla or Opera. I also only get "<center> is depreciated in HTML 4.1", that is the only error I ever really get, I never get the <script> attribute error when targeting IE and IEMac

That should clear it up for you (and yes I updated my HTML validation library regularly)

quote:

It worked like a charm!!! Thanks so much!


Quite welcome Karen, you know where I am if you need help eleswhere [:)]
Dan




d a v e -> RE: Mozilla Browsers and JavaScript (2/18/2004 6:41:56)

you'll find that if you use the W3c validator then it IS required...

http://validator.w3.org/check?verbose=1&uri=http%3A//members.surfeu.fi/dave_pirjo/test-area/test.html

if you replace it with
<script language="JavaScript" type="text/javascript">
then it validates (well apart from the missing alt tag!)
http://validator.w3.org/check?verbose=1&uri=http%3A//members.surfeu.fi/dave_pirjo/test-area/test2.html




Giomanach -> RE: Mozilla Browsers and JavaScript (2/18/2004 6:47:17)

You will find that you are one a Unix Apache server, however, DWMX2004 bases it's validations etc on Windows based servers. Plus, it's rarely used anyway, it's slowly being replaced with CSS.

Dan




davids -> RE: Mozilla Browsers and JavaScript (2/18/2004 7:11:52)

GioManach,

I don't understand why you are trying to convince people that the validation of an HTML document depends upon the server or the browser. That is complete misinformation, from my understanding.

When in doubt, read the instructions:W3C specifications HTML 4.01 <script> tag.

And to say that it's rarely used is also quite misleading. Javascript is widely used, as there are few sites that are full CSS and many things that CSS cannot do




Giomanach -> RE: Mozilla Browsers and JavaScript (2/18/2004 7:26:31)

Download DWMX2004, and run the validation checks, it does not pick out the type attribute, but when you run the target browser check, it does.

With regards to the CSS/JavaScript, CSS is advancing, and is taking over some of the functions JavaScript used to cover.

I am not trying to convince people that the difference on server software will alter the results of the validation, however, there are slight differences between the way they read the coding.

You might also want to note, some of the older browsers don't support some of the attributes used today, therefore, leaving out the type attribute might be necessary, the newer HTML standards state that it must be there, but what about the browsers that don't comply with that?




davids -> RE: Mozilla Browsers and JavaScript (2/18/2004 7:40:50)

Yes, for older browsers I leave in the language= attribute. Even though it is no longer part of the specification, it does not prevent the page from validating.

I guess DW should fix their validator. If you specify a DOCTYPE, then their validator should conform to it.

The area where CSS falls way short of Javascript is in manipulating the document object, especially in forms. But I might be wrong about this, since I am not very handy with CSS.




Giomanach -> RE: Mozilla Browsers and JavaScript (2/18/2004 7:46:04)

Just to clarify for you David:

JavaScript is a programming language that is used to manipulate the way the browser reacts to the users actions. This can be anything from altering the status bar, to making images appear in the same place rather than on separate pages.

CSS is used to format layout, text and objects of the HTML variety. It is slowly developing to a more simplified form of JavaScript (CSS2), but as yet it cannot alter the browser behavior, but it has over taken certain functions like roll over effects on hyperlinks, adding simple animations to text.

I shall also contact Macromedia to see if I can get an update to alter the validator

Dan




Nancy -> RE: Mozilla Browsers and JavaScript (2/18/2004 23:53:16)

First, Javascript is not a programming language. It is a scripting language. There is a world of difference, as well as some similarities.

Secondly, CSS is NOT developing into a more simplified form of Javascript. It is being used as an alternative to Javascript, to provide what appears as interactivity through style. As far as I know it will not be used to alter browser behavior.

Thirdly, whether you use DW or any other HTML editor, they all have their faults. Checking for target browsers is not the same thing as validating a site according to W3C standards. And while we are on the subject, can you show me documentation that Macromedia "bases it's validations etc on Windows based servers" That makes no sense at all to me.

And lastly, why would any discussion of servers be in this conversation to begin with, when the conversation has been regarding CSS, Javascript, and validation?

Dan, I think you need to be more careful with the information you provide.

Nancy




Mojo -> RE: Mozilla Browsers and JavaScript (2/19/2004 0:22:33)

quote:

GioManach,

I don't understand why you are trying to convince people that the validation of an HTML document depends upon the server or the browser. That is complete misinformation, from my understanding.


Correct. W3C is the standard. Dreamweaver is just a tool that apparently does a poor job of validation.




gorilla -> RE: Mozilla Browsers and JavaScript (2/19/2004 1:39:18)

Two not so small points

- the mime type is required for parsing.

- There's a lot of confusion out there about validation, so I'm going echo mojojo's point - W3C is the standard. Not dreamweaver, not csscheckit, not any tool The standard is set by W3C. This is essential information to be borne in mind by web coders.

I use a tool to quickly check for "frontpage funnies" notably that it sometimes forgets to close tags in tables. I do it because it is quick and handy, when I'm finished I use the w3c standard by using the w3c validator.

As Nancy said above various tools have strenghts and weaknesses. This is true of browsers also. The important point about the standards is that when/if we ever reach that happy point where browser manufacturers produce browsers that match the spec we'll then, producers and consumers alike, be far better off.

Kudos to mojojo for raising this and expressing so clearly.




Giomanach -> RE: Mozilla Browsers and JavaScript (2/19/2004 5:48:01)

So I've been proven wrong, in more than one way, no biggie, but as I said earlier in this thread, I am still learning, and have obviously learnt the wrong tutorials, oh well, I'll re-read a hell of a lot of them.

And as for DW, I shall email Macromedia with a demanding note asking them to update the validation facility etc, as the PC I use at home currently has no Internet access at all, so I have to rely on it to validate the web documents before I upload.

Off to start learning again....

Dan




davids -> RE: Mozilla Browsers and JavaScript (2/19/2004 6:50:45)

Well, that's a positive attitude that's an example for everyone! [:)]




Giomanach -> RE: Mozilla Browsers and JavaScript (2/19/2004 6:56:18)

Say that to my Mom (c1sissy)[8D]

Dan




gorilla -> RE: Mozilla Browsers and JavaScript (2/19/2004 14:30:18)

Hear hear - well said david




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625