Go Back   Graphic Design Forum > Graphic Design > Web Design

Web Design Web Design type posts here

Reply
 
Thread Tools Search this Thread Display Modes
Old 11-19-2009, 02:39 PM   #1
Dr.McNinja
Member
 
Dr.McNinja's Avatar
 
Join Date: Aug 2009
Posts: 61
Looking for a little clarity on MooTools

I understand that I need an understanding of javascript to use.

I do not have such.

So in this interim before I finally learn it, if I do, I have a few questions about MooTools/javascripts.

Is this how it works:
1. Write javascript with mootools for a sliding contact page
2. Make sure it loads
3. Write some _code_ in the body that matches with your javascript
4. Works

Are there any problems with using it in MediaWiki or extra steps to be taken?

I've got a MooTools extension in place but I could have just added the MooTools core to my common javascript page (adds to/overrides default javascript).

On the MooTools demo page, i downloaded fx.slide and there was only a javascript and css file.

I will give testing another shot right now.. Someone please tell me before i rip my eyes out.

Edit: another failure, whenever i click on any button to perform a javascript action such as 'open' or 'toggle', nothing happens and a hash # is added to the end of the page title / url. This also happened with Modalbox and Lightbox2 which have yet to work.

I tried putting the core mootools into my javascript page but it turns out to be 92 pages long of code so it came out blank. I've tried moving js files around and referencing them but it always returns the hash.
________

I'll also add that I installed NavFrame which is a open/close box and that worked fine - copied javascript and css.

Last edited by Dr.McNinja; 11-19-2009 at 02:57 PM..
Dr.McNinja is offline   Reply With Quote
Old 11-20-2009, 05:06 PM   #2
vanishdesign
Web usability geek
 
Join Date: Feb 2009
Location: Austin, Texas, USA
Posts: 428
I am not familiar with MooTools but I use jQuery and Javascript and it is not any less of a headache. I am not an expert with either so bear with me and watch as someone else contradicts me and is 100% correct.

If the buttons hooked up to mootools are loading a hash (#) and not doing anything, it means one of two things: 1)the function isn't loading or 2)there's an error in your javascript.

Are your scripts using the mootools "onload" or "document ready" states? A lot of the time, if you're altering a document, like say adding a <p> tag or showing/hiding a <div> your document must be loaded completely before Javascript can do anything with it. You can also fix this by loading your scripts (placing the <script> tags) at the bottom of the HTML.
__________________
Vanish Design: Austin Web Designer
vanishdesign is offline   Reply With Quote
Old 11-20-2009, 10:11 PM   #3
Drazan
Mod Pod
 
Drazan's Avatar
 
Join Date: Sep 2006
Location: Rochester, MN
Posts: 3,781
MooTools is a predetermined library of tools (functions) that allows people to call those functions through script bits.

This mootools.js is just called in the header as it is supposed to be with proper path, there's no reason to put it in your html file.

Sometimes MooTools and Jquery do not play well together. Also when combining multiple javascripts as there may be a variable collision which causes things not to work correctly. Check the header of mediawiki to see if any other libraries are called.

The thing with demo on the core tool pages is that most of the time they are not the complete code, they are only examples of things that you can include within your own script. If they have an html page for you to look at and see how that particular page is set up is better.

So instead of looking on the core pages, try looking for a script that has the html, js, and css bundled in the examples. dynamicdrive is good place to start.

Jade
Drazan is offline   Reply With Quote
Old 11-21-2009, 02:50 AM   #4
Dr.McNinja
Member
 
Dr.McNinja's Avatar
 
Join Date: Aug 2009
Posts: 61
The demos have a download link which provide the html, js and css file, and opening the html file will show the demo working perfectly.

I was thrilled, because it seemed like thats all i needed so i added the code to my site.

As it is in mediawiki, i added the js to the common.js page which is supposed to load for every page. Same problem.

Another thing i've tried to install was NavFrame used on Wikipedia and it worked only on opera for a while, then something broke it. I have no idea what but all of this is driving me insane. NavFrame is a simple show/hide div.

This is the first line of code for fx.slide:
window.addEvent('domready', function() {
The same thing happened for the previous js things that used onload attributes.

thanks for the help, i'll go take a closer look...
Dr.McNinja is offline   Reply With Quote
Reply

Bookmarks


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:41 PM.




GRAPHICS.COM NEWSLETTER
The weekly Graphics.com newsletter is a great way to stay up to date on what's new on the site and in the world of graphics. Subscribe »
JOB LISTINGS
Featured Listings
Spring and Summer Communications Internships
The Congressional Hispanic Caucus Institute (CHCI)
Washington, DC
Director of Leadership Communications
The Savannah College of Art and Design
Savannah, GA
Photo Retoucher for Major Entertainment Company
Adecco Creative (Photo Retoucher)
Stamford, CT
Senior Webmaster/Designer
DiversityInc
Newark, NJ

See all other great design jobs on our Job Board

Post a risk-free
job listing for $279


Latest Blog Entries

Hollywood vs. The People of Walmart
Ben Kessler

Aol. Debris
Susan Kirkland

Designism 4.0: Is Sustainability Sustainable?
Ben Kessler

A Few Thoughts on Fluid & Static Media
Susan Kirkland

The Evolution of Paper
Chris Dickman

JOBS: Hiring & Firing in Design
Susan Kirkland



WebMediaBrands
mediabistro learnnetwork freelanceconnect SemanticWeb
Jobs | Events | News
Copyright 2010 WebMediaBrands Inc. All rights reserved.
Advertise | Terms of Use | Privacy Policy

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.