Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

recommend a good book to learn Javascript... 1

Status
Not open for further replies.

fluid11

IS-IT--Management
Jan 22, 2002
1,627
US
Can someone please recommend a good book to learn Javascript with? I just want to learn the basics and will probably only use the language occassionaly.

Thanks,
Chris
 
Microsoft?? Is Javascript a Microsoft language? If so, forget it. I work on Linux 95% of the time and need my web sites to work in other browsers besides IE (Opera, Mozilla, Konqueror, etc).

Chris
 
No, Javascript is not Microsoft.

ECMA 216 is the common denominator open-standard. This is really pathetic language that has almost no functionality! :(

JavaScript is a proprietory Netscape/Mozilla language. It has everything in ECMA 216 + lots of non-standard but rather useful methods.

JScript is a proprietory Microsoft language. It has everything in ECMA 216 + lots of non-standard but rather useful methods.

Because they share a common base, they are rather similar but you will frequently need to patch scripts for cross compatibility.

Opera supports ECMA 216 + some of JavaScript and some of JScript but it's a long way behind both.

Pretty non-standard ain't it? :)

----------
I'm willing to trade custom scripts for... [see profile]
 
get the O'Reilly book "Javascript: The Definitive Guide"

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
Do you use JScript and Javascript the same way? Are all the commands the same? Is this something that you have to download and install on a web server or do web browsers understand Javascript commands automatically?

I'm not a programmer. The only programming language I know is Perl, which I just taught myself this month. I've been writing some CGI scripts and found that a lot of the things that I want to do require Javascript in addition to Perl/CGI.

jemminger, I actually purchased O'Reilly's Learning Perl last month and wasn't impressed at all. It was a terrible book for someone who doesn't already know something about Perl. I went out and picked up SAMS Teach Yourself Perl in 21 Days and was very pleased with it. I'll go to Borders and take a look at the O'Reilly book but I have lost my confidence that an O'Reilly book can teach you something that you don't already know. In my experience, the O'Reilly books are good for advanced topics, or for a good review of something.

Has anybody read SAMS Teach Yourself Javascript in 21 Days? Any good?

Chris
 
Yup,
I read SAMS teach yourself in 21 days series quite a lot. (But not Javascript). Found it good for me.

I recommend it.

End
 

IMHO, The O'Reilly JavaScript book is worth its weight in gold. It really is a valuable reference guide.

As to whether it is a good book to learn from... I guess that depends on factors like your current knowledge, and your aptitude to learn new languages quickly. I found it good, some people will undoubtedly find it not-so-good.

Dan
 
the o'reilly book is probably not your best choice for a tutorial type read, but it covers the language inside and out. i've read it cover to cover twice


=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
I have never had a Javascript book. Always looking for good PERL books though because the online resource is only so-so. I hear "The PERL Cookbook" is good :)

> Do you use JScript and Javascript the same way? Are all
> the commands the same? Is this something that you have
> to download and install on a web server or do web
> browsers understand Javascript commands automatically?

The syntax and structure is standard. This is specified in the industry standards and is retained in non-standard addons. I guess it's a bit like C or PERL but a little more friendly.

This may not make much sense but anyway:
Code:
var variableName = value;
function functionName(variable){
}
command(argument){statement;}

For the most part commands are the same and Mozilla/Microsoft do actually seem to regulate themselves and clone each other.

Sadly, the actual browser capabilities are different so a command supported by MSIE may not be supported by Mozilla.

In such a scenario it's not normally a case of substituting one command for another, there simply is no support for what you're asking of it. This is more common with DHTML

DHTML = Manipulating HTML using javascript/jscript.

This normally means a whole new solution needs to be sought - but that's where Tek-Tips.com really helps so no need to worry :)

> Is this something that you have
> to download and install on a web server or do web
> browsers understand Javascript commands automatically?

It's something supported by the client machine. This s normally means the web browser but..

In the case of JScript, support is actually added to the operating systems when you install MSIE 5+. This means an OS may be able to launch stand-alone *.JS scripts, or may be able to launch stand-alone *.HTA programs, in addition to running JScript in the browser.

In the case of JavaScript, support is restricted to running JavaScript in the browser.

----

When scripting for a browser you can specify which language to use but I'm not 100% sure of the options. I don't normally bother with this:

<SCRIPT>
// this script will be launched by any browser
</SCRIPT>

<SCRIPT LANGUAGE=&quot;JSCRIPT&quot;>
// this script will be launched by MSIE + Opera only
</SCRIPT>

<SCRIPT LANGUAGE=&quot;JAVASCRIPT&quot;>
// this script will be launched by any browser
</SCRIPT>

----------
I'm willing to trade custom scripts for... [see profile]
 
Also,

*.jsp = JavaScript Page

Unlike all of the previous examples, *.JSP is interpreted by a Netscape web server. It's not a very common language but it does exist.

For the most part it looks like client-side JavaScript (i.e. same syntax/layout) but obviously has support for server-related stuff.

I have never used this language, and never had a server that supports it. Don't really know much about it.

----------
I'm willing to trade custom scripts for... [see profile]
 
JSP can also stand for Java Server Pages - which are supported by many non-IIS servers and are quite common as well.

As mentioned you can use Javascript instead of VBScript when creating Active Server Page - or ASP - scripts which require a Windows Server - unless you are using an emulator such as Chill!Soft.

The Teach Yourself/Dummies books are great for learning something completely new, but the O'Reilly books take on from there. Suggest that you have a look at both and then decide, you may want to get one now and then the other later once you have mastered the basics.

Another JS books which seems popular is Danny Goodman's Javascript Bible.
 
>> *.jsp = JavaScript Page

while netscape does have a server-side javascript technology, i would have to disagree and say that typically JSP means Java Server Page



=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
I can also vouch for the veracity of Flanigan's JavaScript book, published by O'Reilly. Of the oodles of O'Reilly boks I've used, the only one tht was a dud was the &quot;Information Architecture&quot; book, which convinced me that someone must have hacked the printservers at O'Reilly and printed that junk instead of a useful book.

I've learned a bunch of different languages in my life, so it probably made JavaScript easier to learn.

I made extensive use of Google.

The strongest learning tool I had, however, was this very forum. I'd run across a question and then, on my own, start dinking around until I'd either figured out the answer or given up. Then I check the site and see what others came up with. Or I'd hunt around the web a bit. My Flanagan book is quite dogeared.

Eventually, for some things, I discovered that I was coming up with code solutions before other people were. I'd post 'em and go on to another question.

Hope that helps!

Cheers,


[monkey] Edward [monkey]

&quot;Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!&quot; -- inventor of the cat door
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top