 |
Account Login
|
 |
 |
Latest Articles
|
 |
 |
IRC Channel
|
 |
 |
Associates
|
 |
 |
Associates
|
 |
|
 |
 |
|
 |
04-25-2009, 09:14 PM
|
#1 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Mootools
Ok so I downloaded Mootools...
All I have to do is include this outside script and that's it??
mootools-1.2.2-core-nc.js.txt
Then just start learning how to use its syntax?
|
|
|
|
04-26-2009, 01:02 AM
|
#2 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
It should end in a JS extension, not a TXT extension, shouldn't it? But yes, once included you're good to go.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|
04-26-2009, 01:16 AM
|
#3 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Quote:
Originally Posted by Wildhoney
It should end in a JS extension, not a TXT extension, shouldn't it? But yes, once included you're good to go.
|
Thanks!
That's what I thought, for some reason it downloaded as .txt extension but I will rename it to .js
They weren't kidding about being compact!
|
|
|
|
04-26-2009, 03:21 PM
|
#4 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Although I was a "Mootool'er" at first, I must recomend you to use jQuery. First of all, it's much more used, and there's alot more tutorials on it. In fact, if you check out blog.themeforest, and search for jQuery, there's a "jQuery for beginners" - a HUGE 15(16 actually) part series that will start you off from SCRATCH!
Anyways, if you still wanna go with Mootools, it's just to import it with a link tag in the HTML page.
__________________
|
|
|
|
04-26-2009, 03:45 PM
|
#5 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Quote:
Originally Posted by Tanax
Although I was a "Mootool'er" at first, I must recomend you to use jQuery. First of all, it's much more used, and there's alot more tutorials on it. In fact, if you check out blog.themeforest, and search for jQuery, there's a "jQuery for beginners" - a HUGE 15(16 actually) part series that will start you off from SCRATCH!
Anyways, if you still wanna go with Mootools, it's just to import it with a link tag in the HTML page.
|
I've heard of jQuery all over the internet, not Mootools though except for here. Let me take a look at jQuery as well. You've always helped me out in the past so I trust your judgement.
I think there was another fellow in here too that suggested jQuery....
I hope it's not bloated!!!
|
|
|
|
04-26-2009, 04:00 PM
|
#6 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
|
Quote:
|
I hope it's not bloated!!!
|
Not really.
I highly recommend it.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
|
|
|
|
04-26-2009, 04:39 PM
|
#7 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Quote:
Originally Posted by sketchMedia
Not really.
I highly recommend it.
|
checking it out now:
http://jquery.com/
It's amazing, whether it's jquery, mootools etc, we are learning yet another set of language instructions in order to program in another language....
Will there be a super jQuery to interact with jQuery so it can use JS functions?
haha.... 
|
|
|
|
04-26-2009, 05:34 PM
|
#8 (permalink)
|
|
The Addict
Join Date: Jun 2008
Posts: 335
Thanks: 2
|
Well the reason we learn this is to expedite the process of writing JS, for instance we were to want to send an ajax POST request via jQuery we'd simply do
Code:
$.post('file.php',{postInfo: dataVar}, function(data){ alert('foo'); });
how ever, if we were to do it by hand we'd have something like ( taken from a tutorial, didn't feel like writing it )
Code:
var http_request = false;
function makePOSTRequest(url, parameters) {
http_request = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
// set type accordingly to anticipated content type
//http_request.overrideMimeType('text/xml');
http_request.overrideMimeType('text/html');
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert('Cannot create XMLHTTP instance');
return false;
}
http_request.onreadystatechange = alertContents;
http_request.open('POST', url, true);
http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http_request.setRequestHeader("Content-length", parameters.length);
http_request.setRequestHeader("Connection", "close");
http_request.send(parameters);
}
function alertContents() {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
alert('foo');
} else {
alert('There was a problem with the request.');
}
}
}
postString = 'postData=' + encodeURI(dataVar);
makePOSTRequest('post.php', postString);
You see the advantage? Admittedly though, henceforth the makePOSTRequest function is available for the rest of the script but it is currently not as flexible as the one that jQuery has available
|
|
|
|
04-26-2009, 05:37 PM
|
#9 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Quote:
Originally Posted by Enfernikus
Well the reason we learn this is to expedite the process of writing JS, for instance we were to want to send an ajax POST request via jQuery we'd simply do
Code:
$.post('file.php',{postInfo: dataVar}, function(data){ alert('foo'); });
how ever, if we were to do it by hand we'd have something like ( taken from a tutorial, didn't feel like writing it )
Code:
var http_request = false;
function makePOSTRequest(url, parameters) {
http_request = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
// set type accordingly to anticipated content type
//http_request.overrideMimeType('text/xml');
http_request.overrideMimeType('text/html');
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert('Cannot create XMLHTTP instance');
return false;
}
http_request.onreadystatechange = alertContents;
http_request.open('POST', url, true);
http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http_request.setRequestHeader("Content-length", parameters.length);
http_request.setRequestHeader("Connection", "close");
http_request.send(parameters);
}
function alertContents() {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
alert('foo');
} else {
alert('There was a problem with the request.');
}
}
}
postString = 'postData=' + encodeURI(dataVar);
makePOSTRequest('post.php', postString);
You see the advantage? Admittedly though, henceforth the makePOSTRequest function is available for the rest of the script but it is currently not as flexible as the one that jQuery has available
|
WOW!! Big difference....
Thanks....
I just hope the learning curve isn't steep for a JS newbie...
|
|
|
|
04-26-2009, 06:28 PM
|
#10 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Quote:
Originally Posted by allworknoplay
I just hope the learning curve isn't steep for a JS newbie...
|
Check out the tutorials, it's actually really easy to understand!
__________________
|
|
|
|
05-16-2009, 11:27 PM
|
#11 (permalink)
|
|
The Wanderer
Join Date: May 2009
Location: Ljubljana, Slovenia
Posts: 9
Thanks: 0
|
Quote:
Originally Posted by Tanax
Although I was a "Mootool'er" at first, I must recomend you to use jQuery. First of all, it's much more used, and there's alot more tutorials on it. In fact, if you check out blog.themeforest, and search for jQuery, there's a "jQuery for beginners" - a HUGE 15(16 actually) part series that will start you off from SCRATCH!
Anyways, if you still wanna go with Mootools, it's just to import it with a link tag in the HTML page.
|
Have the same bio and I agree. jQuery
PS: I had some issues using complex Mootool's Ajax with Safari. Next they removed some functions with next version, that were clearly not OK from start, so thinks stopped working after upgrade. Feels like MS.
|
|
|
05-17-2009, 02:27 AM
|
#12 (permalink)
|
|
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
|
Yeah jQuery is amazing, I've made a quite a few plugins for it.
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|