TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-25-2009, 09:14 PM   #1 (permalink)
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 646
Thanks: 64
allworknoplay is on a distinguished road
Default 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?
allworknoplay is offline  
Reply With Quote
Old 04-26-2009, 01:02 AM   #2 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,215
Thanks: 90
Wildhoney is on a distinguished road
Default

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.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 04-26-2009, 01:16 AM   #3 (permalink)
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 646
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by Wildhoney View Post
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!
allworknoplay is offline  
Reply With Quote
Old 04-26-2009, 03:21 PM   #4 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,053
Thanks: 115
Tanax is on a distinguished road
Default

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.
__________________
Tanax is offline  
Reply With Quote
Old 04-26-2009, 03:45 PM   #5 (permalink)
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 646
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by Tanax View Post
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!!!
allworknoplay is offline  
Reply With Quote
Old 04-26-2009, 04:00 PM   #6 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 836
Thanks: 31
sketchMedia is on a distinguished road
Default

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)
sketchMedia is offline  
Reply With Quote
Old 04-26-2009, 04:39 PM   #7 (permalink)
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 646
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by sketchMedia View Post
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....
allworknoplay is offline  
Reply With Quote
Old 04-26-2009, 05:34 PM   #8 (permalink)
The Addict
 
Enfernikus's Avatar
 
Join Date: Jun 2008
Posts: 322
Thanks: 2
Enfernikus is on a distinguished road
Default

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
Enfernikus is offline  
Reply With Quote
Old 04-26-2009, 05:37 PM   #9 (permalink)
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 646
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by Enfernikus View Post
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...
allworknoplay is offline  
Reply With Quote
Old 04-26-2009, 06:28 PM   #10 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,053
Thanks: 115
Tanax is on a distinguished road
Default

Quote:
Originally Posted by allworknoplay View Post
I just hope the learning curve isn't steep for a JS newbie...
Check out the tutorials, it's actually really easy to understand!
__________________
Tanax is offline  
Reply With Quote
Old 05-16-2009, 11:27 PM   #11 (permalink)
The Wanderer
 
gregor171's Avatar
 
Join Date: May 2009
Location: Ljubljana, Slovenia
Posts: 9
Thanks: 0
gregor171 is on a distinguished road
Default

Quote:
Originally Posted by Tanax View Post
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.
__________________
WEB Developer
http://xweblabs.com
http://grajzar.info
Send a message via Skype™ to gregor171
gregor171 is offline  
Reply With Quote
Old 05-17-2009, 02:27 AM   #12 (permalink)
how quixotic are you?
 
ETbyrne's Avatar
 
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
ETbyrne is on a distinguished road
Default

Yeah jQuery is amazing, I've made a quite a few plugins for it.
__________________
Dingo Web Systems > http://www.dingocode.com
My Website > http://www.evanbot.com
ETbyrne is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Prototype vs. jQuery vs. Mootools Orc Javascript, AJAX, E4X 17 07-10-2008 05:52 PM
slide effect’s with mootools ubie Javascript, AJAX, E4X 2 03-08-2008 02:03 PM
Mootools Tanax Javascript, AJAX, E4X 2 03-07-2008 03:19 PM


All times are GMT. The time now is 03:04 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design