|
|
|
|
![]() ![]() |
Feb 7 2006, 07:50 AM
Post
#1
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 3 Joined: 6-February 06 From: Australia Member No.: 11,122 |
Well, I know HTML, I know CSS, so the next step is learning Javascript. I have heard that it is sort of an easier way to do things than PHP, though I would very much like to learn PHP as well. So, I thought that if I learnt Javascript, I might find it easier to learn PHP when I get to that point. The problem though is actually finding out the best way to learn Javascript.
I have been to websites and things, but every time I read through the tutorials and articles and things, I didn't learn anything. It when in one ear and out the other, you could say. So, that is why I am psoting this. I would very much love to know what the best (easiest and quickest) way to learn Javascript. Thank you in advanced. |
|
|
|
Feb 26 2006, 04:54 PM
Post
#2
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 11 Joined: 26-February 06 Member No.: 11,581 |
If you want to learn the basics of it I would suggest "The Book of Javascript" by Thau
|
|
|
|
Feb 27 2006, 04:56 PM
Post
#3
|
|
|
the Q Group: [HOSTED] Posts: 1,015 Joined: 13-July 05 From: Lithuania, Vilnius Member No.: 7,059 |
I personally think that javascript is a lame language, go with php and don't worry to much about javascript. I never learned javascript deeply, just the basics and the structure of it, you can do powerful things with it, but I usually do this: I have a friend who knows javascript, but it is hard for him to learn php, so many people I know who got deep into javascript, it is hard for them to go deep into php. Javascript, the stuff it does, to write it properly is quite hard and if you encounter some problem, sometimes it is really hard to catch it even with js error consoles.
Furthermore, there are plenty of written javascript code out there, of course php too, but most of the php scripts written by others are not really of good quality, people who really wrote good scripts, usually use them for them selfs or they are just lazy to rewrite them for public usage or even document it. As I said, this is just my personal opinion, because I don't know superb knowledge of javascript and never liked it to much, always liked the alternatives.. |
|
|
|
Feb 27 2006, 09:50 PM
Post
#4
|
|
|
Premium Member Group: Members Posts: 292 Joined: 15-December 04 Member No.: 1,768 |
As my professor always says. "The best way to learn programming, is to do it." Study the Document Object Model, and you'll get a basic understanding of how to access content via javascript. The language itself is very similiar to any other scripting language. Like mentioned before, PHP would probably be a better choice, but if you want Javascript for a reason, it's always good to know. I recommend looking at online tutorials and finding examples. The one thing about javascript is it's hard to debug. Mozilla Firefox has a javascript debugger that works alright, and firefox has the extension, but it's still aggrivating to debug. I definately suggest using firefox because it has the javascript console over internet explorer to develop javascript.
Some places to find a good primer are http://www.htmlgoodies.com http://www.w3.org/TR/REC-html40/interact/scripts.html Just look into the DOM and event handlers. That plays a large role in javascript. As far as advanced Javascript, I have no idea. I would like to know myself. |
|
|
|
Feb 28 2006, 03:12 AM
Post
#5
|
|
|
'Prentice de-Zighner Group: Members Posts: 368 Joined: 23-January 05 From: USA Member No.: 2,290 |
I had always wanted to pursue Javascript and/or PHP and learn more about it. But i find it extremely hard to learn if i don't get to apply it myself. Like when i first started HTML, i had a bunch of questions about how to do this and how to do that and display everything like i see in other sites. When i started CSS, its because i wanted an alternative to iframes and to better organize my source codes well. So basically, I've been using HTML and CSS for every coding I've done. Javascript isn't necessary in making a good-looking site which is why i never really used it and PHP too.
|
|
|
|
Feb 28 2006, 09:40 AM
Post
#6
|
|
|
BUG.SWAT.PATROL Group: Members Posts: 626 Joined: 1-September 04 From: Auckland, New Zealand Member No.: 27 |
I would not avoid learning Javascript, it can help speed things up, especially if a lot of things can be done clientside rather than using the server.
I'd say, read the EMCA-262 on Javascript, it's not really going to help you learn like a tutorial would but it's more like a reference and guideline, it's also the standards. I know a lot of web languages, but you shouldn't avoid using javascript, as long as you apply it correctly, it can dramatically help speed things up. The term coined "AJAX" is definitely something to keep an eye on, as more and more web applications are built using it. Learning the DOM API also would be required. There's some who don't use Javascript, but you'll find that in most situations it's neccessary to run, since web developers don't degrade nicely without it. So do try to learn how you can also get by without using Javascript, since that's important to do too. Cheers, MC |
|
|
|
Mar 6 2006, 05:34 PM
Post
#7
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 4 Joined: 6-March 06 Member No.: 11,776 |
Có ai có địa chỉ để download ebook về JS không? chỉ cho tôi với! Tôi cũng muốn có 1 quyển để học và hiểu để lảm về AJAX
|
|
|
|
Mar 7 2008, 09:41 PM
Post
#8
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 14 Joined: 7-March 08 Member No.: 28,957 |
Head First Javascript helped me learn. You can get a paperback version for $20 on Amazon.
w3schools.com is a really helpful website with all kinds of scripting examples to look at and download I know you said you didn't like online tutorials, but if you take it slow w3's are really quite helpful. |
|
|
|
Mar 30 2008, 06:55 PM
Post
#9
|
|
|
Member [ Level 1 ] Group: [HOSTED] Posts: 47 Joined: 4-February 08 Member No.: 28,119 |
I think the best way to learn Javascript is to create in text editor a simpliest HTML file and save it on your local machine.
For example, you can create something like: <html> <script language='javascript'> function mytest() { // any javacript code for testing purpose } </script> <body> <input type='button' value='Do My Test' onClick='mytest()' /> </body> </html> Having this you can put into the mytest() function any javascript code whatever you want - for example, you can take any part of code from the tutorials and execute immediately. For debugging purposes it is very useful to use the method Alert(). It gives a possibility to visualize any intermediate calculation results etc. I think the method Alert() can be considered like an altervative of debugging breakpoints, used in Java and C++ IDE. For example, I want to use some simple math formulas in Javascript and I found in tutorial how to do this. I am updating mytest() function: function mytest() { alert('mytest started'); var arg1 = 2; var arg1 = 3; alert('before finding result'); var res = Number(arg1) + Number(arg2); alert( res ); } When I open my test page in the browser and click "Do My Test" button, I see alert message "mytest started". So, I am sure that mytest() function is correctly called by Javascript. After that I see the message "before finding result". It means, that I still di not have any errors in Javascript. But I do NOT see the message with the result of calculation. It means, I have some script errors on the line var res = Number(arg1) + Number(arg2) What is wrang??? I am looking on my code very attentiavelly and I see: variable arg2 is not declared, but used on the right side of Javascript statement because I decraled two times variable arg1!!! I correct my Javascript code: function mytest() { alert('mytest started'); var arg1 = 2; var arg2 = 3; alert('before finding result'); var res = Number(arg1) + Number(arg2); alert( res ); } After re-opening updated page in the browser, I see all alert messages, including the message with result "5". It means, my Javascript code is perfect and ready for using anywhere in my future job! I can add this debugged source code to any other Javascript code (with a very complicated business logic) and I can be sure it will work correctly. So, step by step (looking at tutorials and realizing immediately), I can create with Javascript any bussiness logic for my project! This post has been edited by java-area: Mar 30 2008, 07:14 PM |
|
|
|
May 30 2008, 02:59 PM
Post
#10
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 8 Joined: 30-May 08 Member No.: 30,660 |
Umm, the best site there is for basic scripting learning:
www.w3schools.com It will teach you everything you need, begging at HTML, through JS, XML and others... Strongly recommended.. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 29th August 2008 - 05:19 AM |