/    Sign up×
Community /Pin to ProfileBookmark

Good javascript learning book

Hi (i have searched the forums for an earlier thread on this but no luck)

Im looking for a VERY good book on learning javascript as i just cant seem to get it, ive tried the w3c schools and although its good it only teaches simple stuff (which i can now write) and doesn’t go into variables or functions and other such usefull things.

Im not the brainiest person in the world some things i pick up quickly such as html and css, but j/script im having real trouble with but i really want to learn it as fluently as possible, so if anyone can recommend a really good book that can teach me step by step, i would very much appreciate it.
Thanks alot.

to post a comment
JavaScript

24 Comments(s)

Copy linkTweet thisAlerts:
@Vassil_CatsarovAug 18.2008 — W3schools is far from simple and according to me it offers complete, yet concise reference... So if anyone has mastered their examples, he is to be a true JavaScript expert... And I don't think that without understanding the concept behind variables and functions, any kind of useful code could be written... That is why I see a contradiction in your intro...

JavaScript is easy... I read this tens of times when I started learning... May be... If you have a good teacher... to start you with the concepts, and then gradually to get you involved into more and more complex matter...

Thau's JavaScript tutorial helped me understand how easy JavaScript was and that is why I am recommending it to all the beginners:

http://www.webmonkey.com/tutorial/JavaScript_Tutorial_-_Lesson_1
Copy linkTweet thisAlerts:
@no_good_at_thisauthorAug 18.2008 — Firstly its not a good idea to reply to a person asking for help to learn javascript by saying 'its easy' if i found it easy i wouldn't be posting a message in a forum asking for HELP!.

Secondly, i said the wc3 schools only taught me the simple stuff because further on from that im having trouble understanding it I.E im getting confused as the code gets more complex, i could take the codes from the w3c and look at them all day long i just dont know how to put them into use for my own benifit, i cant use the code confidently if i dont know how to edit/fix problems when problems arise.

Im sorry if my reply seems as though im getting irate, but if someone turned to me and said they wanted to learn html and css, and my reply was 'its easy', you could imagine how that 'someone' might take it especially if that someone's intellegence levels were clearly lower than my own!
Copy linkTweet thisAlerts:
@no_good_at_thisauthorAug 18.2008 — I must appologise for my reply above, i got as far as javascript is easy.... and thoguth you were saying that too me.

With that said if i hear those three words again il smash my own head in on the nearest brick wall.

Again appologies.
Copy linkTweet thisAlerts:
@Jeff_MottAug 19.2008 — no/good/at/this, don't feel bad. There is indeed quite a lot to know about JavaScript beyond what W3 Schools gets into.

The book [url=http://www.amazon.com/JavaScript-Definitive-Guide-David-Flanagan/dp/0596101996/ref=bxgy_cc_b_img_a]JavaScript: The Definitive Guide[/url] is the de facto standard book on JavaScript.

And when you get really ambitious, you can go straight to the source: the [url=http://www.ecma-international.org/publications/standards/Ecma-262.htm]ECMA-262[/url] standard, the [url=http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/Overview.html#contents]W3C DOM Specification[/url], and the [url=http://www.w3.org/TR/XMLHttpRequest/]XMLHttpRequest working draft[/url], and a few other resources that are important.
Copy linkTweet thisAlerts:
@Vassil_CatsarovAug 19.2008 — Well, maybe I was not clear enough ? I remember the frustration when I first attempted to "decipher" those "easy" JavaScript statements...

The tutorial I gave you the link above, made things easy for me...

In logical thinking and in nature too, you break down complex things into smaller, known and easier to assimilate ones - it's called analysis in the former and dissimilation in the latter... So if Mother Nature has served you a big rhino for a dinner (like the one on the book cover above), you don't smash your head in the wall - it's big, it's tough, I can't swallow it... You'd better try to chop a stake and try to cook it...
Copy linkTweet thisAlerts:
@no_good_at_thisauthorAug 19.2008 — Ok here's something spooky....Guess what i bought today? yes you guessed it 'javascript, The difinitive guide' and that before i came back to this thread, im gonna get stuck into that and il come back to this thread to comment.

Thankyou both.

And Vassil, ive got that link book marked, and again my appologies, everyone makes a tit of them selfs every once in a while, looks like my turn came around again.

Regards and thanks for your time.
Copy linkTweet thisAlerts:
@no_good_at_thisauthorAug 20.2008 — Hi again chaps, well ive been on webmonkey and all is going well im starting to get a good hang of this jungle that is javascript, ive been doing a few things or should i say trying, one of those things is image swap, im not trying to use this in my site im just giving everything a go to see if i can get it right without peaking,

As i said im trying the image swap but i cant seem to get it to work, here's the code:

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

<img src="fscimages/sea.gif name='sea.gif'">

<a href="#" onMouseOver="document.sea.gif.src='fscimages/carp.gif'; " >change</a>

</script>

The problem im having is i cant get the images to even show up on the page

and im getting error messages such as:

Error: Permission denied to call method Location.toString

Error: unexpected end of XML source

Source File: file:///C:/Users/Dawny%20and%20Jay/Desktop/Fsc%20Website/javascripttestpage.html

Line: 15, Column: 81

Source Code:

<a href="#" onMouseOver="document.sea.gif.src='fscimages/carp.gif'; " >change</a>

Thats just 2, mainly all the same but i dont know what the error message is saying to me if that makes sence?

Im only doing this as a learning curve but..............HELP!

Cheers.
Copy linkTweet thisAlerts:
@A1ien51Aug 20.2008 — That name is not valid. Loose the . in it.

Also document.elementName is bad practice. Should be setting a id on the element and using getElementById or use a form reference.

Eric
Copy linkTweet thisAlerts:
@no_good_at_thisauthorAug 20.2008 — Sorry fella thanks for the reply but, i dont follow. You say loose the .in it. What do you mean by that?

When i say im an absolute beginner at this im not joking ive known variables since yesterday!

Il try the other stuff too, thanks for that.
Copy linkTweet thisAlerts:
@A1ien51Aug 20.2008 — the image name

aka
<i>
</i>name="sea.gif"


can not have the . in it.

Is that clear enough?

You really should be using an id

<i>
</i>&lt;img src="asdf.gif" id="foo" /&gt;



and the script

<i>
</i>document.getElementById("foo").src = "bar.gif";


Eric
Copy linkTweet thisAlerts:
@no_good_at_thisauthorAug 20.2008 — Yeah thats clear enough cheers, i was looking at the actual words not the .

Do i have to include the file path i.e fscimages/sea.gif? or just sea.gif as its not working.

Keep getting error: 'unexpected end of xml'

and 'invalid xml syntax'
Copy linkTweet thisAlerts:
@A1ien51Aug 20.2008 — oh, I did dot even notice your big mistake

You do not need the script tags surrounding the image tags. You only use script tags when you have JavaScript in it. Not elements with inline JavaScript.

I can almost guess the tutorial you got this from did not do that.

Eric
Copy linkTweet thisAlerts:
@no_good_at_thisauthorAug 20.2008 — Ok ive removed the tags as you said and yes im now getting an image, but it doesn't change onmouseover as it should but im not getting any error's either!

Here is the code (be patient i know this must be like pulling teeth)

<img src="fscimages/sea.gif" id="fscimages/sea.gif'">

<a href="#" onMouseOver="document.getElementById.src='fscimages/carp.gif'; " >change</a>
Copy linkTweet thisAlerts:
@no_good_at_thisauthorAug 20.2008 — Error: Permission denied to call method Location.toString i did get an error after all.
Copy linkTweet thisAlerts:
@A1ien51Aug 20.2008 — You did it again. Look at my example and look at yours. You have invalid characters in the name of the element. Give it an id or a name of img1 or firehouse, dog, cat, etc. Do not reused what is in the source tag.

Eric
Copy linkTweet thisAlerts:
@no_good_at_thisauthorAug 21.2008 — Hi again Eric, i left it alone last night as it was starting to do my head in,

http://www.webmonkey.com/tutorial/JavaScript_Tutorial_-_Lesson_2

Above is the link to the source of the code, and thats what i was tring to do, it works on this site, but i still cant get it to work even with your advice, even though you did help, why dont you take a look and see what you think, up to you of course.

Cheers

Jay
Copy linkTweet thisAlerts:
@no_good_at_thisauthorAug 21.2008 — And here's a new one for you to get your teeth into.

Im thinking of using this for my login page,


<script type="text/javascript">

function disp_prompt()

{

var name=prompt("Please enter your username")

var name=prompt("Please enter your password")

if (name!=null && name!="")

{

alert("Hello "+ name +" Welcome back to FSC");

}

}

</script>

There is another piece to this but its just the "button" text.

Im getting an error from the wc3 for '&' character's in the (name!=null && name!="").

The ironic thing is i got this code from the w3c javascript school, the error sais that:

character "&" is the first character of a delimiter but occurred as data.

It sais it for both characters, ive got the code in my head section, ive tried it in the body incase it was that but it returns the same error.

Any idea's?
Copy linkTweet thisAlerts:
@Declan1991Aug 21.2008 — &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html&gt;

&lt;head&gt;
&lt;title&gt;Test&lt;/title&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;script type="application/javascript;version=1.7"&gt;
function disp_prompt() {
var name=prompt("Please enter your name");
if (name!=null &amp;&amp; name!="") {
alert("Hello "+ name +" Welcome back to FSC");
}
}
&lt;/script&gt;
&lt;style type="text/css"&gt;
* {
margin:0;
}
&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;a href="#" onclick="disp_prompt();"&gt;Click&lt;/a&gt;
&lt;/body&gt;

&lt;/html&gt;
works no problem, I changed it alright because you are assigning both prompts to the same variable.
Copy linkTweet thisAlerts:
@no_good_at_thisauthorAug 21.2008 — Quality cheers for that,but that's worrying as the code i posted was a carbon copy of the code on w3c.(basically copied and pasted, i only changed the text between the quotes) and i would expect that to be accurate!
Copy linkTweet thisAlerts:
@Declan1991Aug 21.2008 — Have you that link, and as I said, W3Schools is [b]not[/b] the same as the W3C. They are only associated by name.
Copy linkTweet thisAlerts:
@no_good_at_thisauthorAug 21.2008 — http://www.w3schools.com/js/js_variables.asp

Thats filled me with confidence, all this time i thought it was part of the same thing.

Well thats the link its linked to the variables page.

Now im back to square 1 again, i thoguht i was getting somewhere now i cant rely on any of it!
Copy linkTweet thisAlerts:
@Declan1991Aug 21.2008 — There's nothing on that page that's incorrect, and anything like your script isn't there.
Copy linkTweet thisAlerts:
@no_good_at_thisauthorAug 22.2008 — But thats where it came from, did you look inside all the example's.

Thats the only site ive sampled from so it must be there unless i gave you the wrong link/page.

Il look again and see.
Copy linkTweet thisAlerts:
@no_good_at_thisauthorAug 22.2008 — Appologies, what ive done is, ive sourced the code but edited it so it wont be the same as what is on thw w3c schools, sorry i gave you the run around.
×

Success!

Help @no_good_at_this spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...