ID:181523
 
So, I've been diving in a little bit into Javascript, and I really don't know where to find anything good to use. I was wondering if anyone here has or knows Javascript stuff and can direct me to a good site that would have libraries or demos or just something that would benefit me well with the language? Kinda like how BYOND.com has libraries, demos, and all these applications and games made with the DM language.
If you really want to learn JavaScript, you will need to suffer through the dark side of JavaScript. Make a website with a highly animated, AJAX-based interface, and make it work with FireFox, Safari, Chrome, IE6, IE7, IE8, and Opera.

Learn the frameworks jQuery, Prototype, and Scriptaculous.

There are tons of websites with tutorials on javascript, simple google searching will bring them up, but I warn you that JS isn't as easy if you're trying to support cross-browser compatibility (which is more important than you might think), and a lot of these sites don't help in that case. There is no substitute for trial and error when it comes to JavaScript.
In response to Kunark
Kunark wrote:
make it work with FireFox, Safari, Chrome

That in itself isn't too difficult, really.

IE6

Why on Earth would you still support this browser? Anyone that uses it deserves to have a "Your browser is out of date and not compatible with this website" message.

If we head on over to w3schools.com, it shows that IE6 is in decline. Especially since any computer using Windows XP gets an automatic update to Windows 8 reasonably quickly on a fresh installation.

IE7, IE8

These two can be made compatible with one another by the inclusion of a meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
This forces IE8 to emulate IE7 when displaying the website. Which is pointless if you're starting from scratch, and is a quick fix at best when you already have a fully functional IE7 website (even more so if it's fully functional with all the other browsers, but somehow breaks in IE8). But I'm not sure if that tag will allow a site to pass standards compliance tests from W3. I assume this works in terms of Javascript as well.

and Opera.

I've noticed that for nearly everything, Opera will agree with Firefox. I use the word nearly because it nitpicks a few things here and there.

There are tons of websites with tutorials on javascript, simple google searching will bring them up, but I warn you that JS isn't as easy if you're trying to support cross-browser compatibility (which is more important than you might think), and a lot of these sites don't help in that case. There is no substitute for trial and error when it comes to JavaScript.

If you're using a server side language like PHP, you can stuff all of your javascript into a PHP document, and return browser specific scripts that way.

I do essentially the same thing with my Google AdSense and use a simple:
<script type='text/javascript' src='my_php_file.php?s=200x200'><script>
To return an ad that's 200x200. The same trick could work for Javascript easily enough.

In a recent standards compliant website I was working on, I found compliance with standards to be the most difficult with Google Chrome, which required three fixes, where Firefox and Internet Explorer 8 required zero.

Oh, and welcome back, Kunark. =D
To get the best out of Javscript, it's good to start with W3Schools Javascript Tutorial and finishing with W3Schools HTML DOM tutorial. The two complement each other.

There's also the EchoEcho.com Javascript tutorial.

Personally, you're best off starting with EchoEcho for the basics, then revising what you've learned in W3Schools and clearing up any discrepancies.

Javascript in itself isn't really that difficult to learn. Short of the function calls there isn't really much to it. It gets a little more difficult when you move into things like AJAX, I'm still perfecting my own little AJAX concoction that essentially allows me to do anything with a form just by adding 'onclick="ajax_command(this.form)"' to the submit button. Which, although works just fine for every browser, still needs some drastic improvement.
In response to Tiberath
Tiberath wrote:
Why on Earth would you still support this browser? Anyone that uses it deserves to have a "Your browser is out of date and not compatible with this website" message.

Not everyone has control over what browser is installed. Like it or not, a lot of corporations and schools still force IE6 upon users.

If we head on over to w3schools.com, it shows that IE6 is in decline. Especially since any computer using Windows XP gets an automatic update to Windows 8 reasonably quickly on a fresh installation.

w3schools' own stats can't be trusted, either. In fact, they say this at the bottom of the page. Their website is oriented towards technical users, so it's no surprise IE6 has a low percentage. Install any decent log analyzer on a major traffic webpage, and you'll see IE6 has a much higher percentage that w3schools shows.
In response to Airjoe
Airjoe wrote:

Not everyone has control over what browser is installed. Like it or not, a lot of corporations and schools still force IE6 upon users.

True, but when possible we should be nudging the corporations and schools into the 2000s. IE6 is old and insecure. Nobody should be using it for everyday web surfing. At my office I can't convince the bosses to let me install Chrome or Firefox on all machines, but we are at least an all IE8 shop. We need to push corporations to do the same.

w3schools' own stats can't be trusted, either. In fact, they say this at the bottom of the page. Their website is oriented towards technical users, so it's no surprise IE6 has a low percentage. Install any decent log analyzer on a major traffic webpage, and you'll see IE6 has a much higher percentage that w3schools shows.

w3schools isn't the only source. IE6 is on the decline world wide, just not as fast as most of us would like. In some regions it is declining much faster, areas such as Europe come to mind. So depending on your target market it may be very viable to push IE6 support completely.
In response to Danial.Beta