![]() |
javascript question
I'm reading a bunch of tutorials on javascript. Perhaps I will learn this later but I am impatient.
1) Does javascript have version numbers? Like my currently installed PHP is 5.2.8, and soon to be 5.3.0. Is there something like that in javascript? If so, what is the current "version"? 2) Is JS the same thing as saying javascript? Or does JS mean something else? 3) Is DOM and javascript intertwined? 4) If anyone recommends any recently published books on javascript, I'll run out and buy it immediately. That's about it for now! Thanks! |
1) Javascript does have versioning, but its not very often used clearly, its more which browser supports what and how. So what you are looking for is the DOM version supported
2) JS is javascript, except that in Microsoft world it may also referer to JScript 3) Javascript is the language, DOM is the Document Object Model which lets you alter the document 4) No clue, but Amazon must have some ;) |
Quote:
Quote:
Quote:
Quote:
|
Thanks you two....
Leave up to Salathe to provide a little history as well! haha.. I appreciate it though, the more I can absorb the better. And I promise, soon enough I will be a pro like you guys and won't be asking so many questions.. I'm in my "catching up" phase... As for books, I do agree, the web is better, faster and more current. I've always like to support the authors a bit, not sure how much of a cut they get though from book sales...I'm sure not very much... This book is newly published and seems ok.... http://www.amazon.com/Professional-J...0338446&sr=1-8 So far JS code looks eerily similar to PHP....except they don't use $ signs for their variables.. PHP: for($i=0;$<10;$i++) { } JS: for(i=0;i<10;i++) { } I'm sure as I learn more it will start to separate itself from PHP syntax/format... |
Quote:
javascript Code:
|
Quote:
Really??? That's great! I'm going to do that then so that I can be more consistent with PHP.... Now that looks even more like PHP....or should say, PHP looks more like JS... :-D Good stuff!!! ^^ |
I would suggest going to w3schools.com and learning how the html dom works. Then javascript will become much easier. But I would not spend to much time with the basic javascript and would jump right into a framework such as jquery.
|
Quote:
javascript Code:
javascript Code:
javascript Code:
javascript Code:
Quote:
|
Quote:
Quote:
|
sketchMedia, I sometimes miss that loose syntax from javascript in PHP, especially when I've been coding Javascript for a few days without PHP. But atleast PHP 5.3 now got Closures!
allworknoplay, I would suggest using Mootools, a nice and easy small framework: http://www.mootools.net/ |
Quote:
What is JSON? And if Mootools is a framework, does it go up against scriptalulous also? And what about joomla? Sorry, for throwing out a lot of names... Also one more thing, I assume that mootools can do the greybox effect? I'm not sure if that's the correct name of it...but it's when you want to view images and the whole browser becomes gray and the image appears in the middle, and it has that animated look... Oh and one more thing... :-D Where can I learn the proper procedures for utilizing the "ajax" loader... ![]() Is it normally used when you're querying a DB and waiting for a result? I've seen this around so much and have never really looked into it... Thank you!!!!!!!!!!!!!!! ^^^^^^^^^^ |
Quote:
Quote:
Quote:
Quote:
HTML Code:
<input type="button" id="request" value="Request" />javascript Code:
So the "trick" is to change the value of the response area to the ajax loader before sending the request ;) |
Thanks Kalle,
That absolutely cleared things up. I will stick with mootool's since you suggested it. I hate anything that is bloated and from what I read quickly, mootool's is pretty compact. Maybe I can get good enough to offer a "grey-box" effect one day for mootool's!! |
Quote:
My personal choice is jQuery, I have not used mootools before but I would recommend jQuery to any new js user. Its real easy to learn and there is a plugin for almost anything you need to do. I would avoid prototype/scriptulous as well as any others. Also stated above was the use of ajax. I would recommend writting one in regular javascript (only about 20 lines) so that you really understand what is going on. Then when you implement it in mootools/jquery you will see how great and simple they have made it. ...IMO objects in js is generally overkill. In all my projects I have never had a need for creating my own javascript objects, i'm sure there are reasons just I have never used them. |
Quote:
Quote:
Exactly!! I am grinding everything out right now so that when I pick a framework, I won't get totally lost. In one of the books I read about a month ago on OO, the author mentioned that a lot of people don't truly understand the fundamentals of OO, and that's why they get lost when projects become bigger and more complex. I've been coding PHP since it was PHP 3.0 and when it was called Pretty Home Page...LOL... But never really sat down to grasp how everything works fundamentally. Same with JS...... I don't have a problem learning both mootools and jquery, but I would probably stop at 2 frameworks.... When I am ready for a JS framework, you'll definitely hear from me.... :-D |
Quote:
Looking forward to 5.3, closures, namespaces and late static binding are gonna be very useful indeed! For the lightboxes, there are 1000's of plugins for more or less all frameworks http://www.phatfusion.net/multibox/ - is one for mootools http://leandrovieira.com/projects/jquery/lightbox/ - jquery For the loader, in jQuery we could do something like this: javascript Code:
you need html like this: html Code:
There are lots of ways of doing this in either framework. Quote:
|
| All times are GMT. The time now is 06:36 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0