mootools

Convert Object to Hash Object in Mootools?

Hello! Is it possible to convert/reassemble the Object to Hash Object? For example and firstly, i have two arrays: ... var animals=[]; //... "cat","dog","cow" var sounds=[]; //.. "meow!","woof!","moo!" var u = animals.associate(sounds); // now "u" is an Object with associative values: "cat" : "meow!" "dog" : "woof!" "cow" : "moo!";...

How to create a fading banner like with SO's badges?

Using .NET, mootools/JavaScript. I want to create a trophy mechanism similar to SO's badges. So when a user recieves a trophy, a small fading DIV will appear at the top of his page. Problem is, I need to keep checking against my DB if the user recieved a new trophy or not. How would you approach it? Would love to get code samples if yo...

Executing Javascript functions by reference.

Hey Team. I'm wondering if any of yall have any insight as to how one could execute a function by reference in javascript. http://mootools.net/shell/yL93N/1/ Any discussion would be cool. -Chase ...

method chaining in mootools using delay for fade effect

Hi, I want to use method chaining in moo tools 1.2. My requirements are as below. When page load complete. My one div element say "my_div" is set to hidden visibility. After half second its opacity set to 0.4 Then again after half second its opacity set to 0.7 Then again after half second its opacity set to 1. So how could i do th...

Joomla + Mootools XMLHttpRequest problem.

I'm building a Joomla extension and i'm trying to send some data to a php script, with MooTools, to be saved in a database. This is the code for the request : myReq: new Request({ url: '/index.php?option=com_calculator&task=saveData', method: 'post', onSuccess: function (responseText, responseXML) { ...

mootools formcheck : regex for number validation

Hello, i need to validate currency field with formcheck plugin for mootools. It has number validation type, and number accepts regex to personalize validation. I need sample to validate: 1.000,01 --> ok 1,000.02 --> not ok 1000,12 --> ok 1000.13 --> not ok 10.000 --> ok 100.00 --> not ok and so on. Can you help me p...

how to call function on onValidateSuccess in mootools

i'm new to mootools i want to fill some fields dynamically after validating form according to form data (same form). so i want to call a function to do so any body can help me? ...

How to add file name in array from xml file in javascript while implementing Google Slideshow

I am trying to implement SlideShow of google in my site www.tapasya.co.in. You can see it on home page. The problem is that i m not being able to add images dynamically such that it can take all the images automatically from folder that i m specifying. Currently i have to add each nd every image in javascripts data array. Is it their ...

looping through DOM / mootools sortables

I can't seem to get a handle on my list of sortables. They are a list of list elements, each with a form inside, which I need to get the values from. Sortables.implement({ serialize: function(){ var serial = []; this.list.getChildren().each(function(el, i){ serial[i] = el.getProperty('id'); }, t...

mootools inject disabled element

I can't seem to figure out how to inject a disabled element. Any help will be appreciated. I apologize, as I made several mistakes posting this. First of all, i was applying the attribute to an h3 element (how do you disable that??, you don't). Also, I'm afraid I have tried a : with still no effect. Please forgive my error, and here is ...

safari displays javascript source instead of executing

i have a web application that has javscript interspersed through the page. What happens is that safari will dump the source of the javascript code instead of executing it. I can reproduce this consistently. The page is a mashup of different forms of content: it loads flash videos using osflv and is generated via a php script on the se...

Mootools datepicker for availability

Hello, I'm trying to make an interface where the user can define the days he is available by adding rows of "from then to then". So in the end the user must be able to make a list like this: From 24 Feb 2010 to 3 March 2010 From 27 March 2010 to 18 April 2010 From 8 May 2010 to 18 July 2010 And so forth. I had the idea of using óne ...

integration of slideshow with light box

hi to all i am using mootools for the slideshow in these i wanna add lightbox on click of slideshow image my slideshow code is following. so plz tell me how i integrate lightBox with it. $table= WB_AD_PHOTO; $where.='nBusinessAdID="'.$businessid.'" AND bAdminApproved="1"'; $data='sPhotoName'; $photoData = getData($tab...

Floated elements: Fill out the bottom line first

One project I'm working on uses tabbed navigation. Because the number of tabs is dynamically calculated, and can reach high numbers, sometimes these tabs (which are, in essence, <li> elements with a float: left; style declaration) overflow into the next line, Using [###] to display a tab, the end result looks something like this: [###] ...

JavaScript/MooTools: IE 6?

What's the easiest way to tell if the browser is an IE 6 version in JavaScript? We're using MooTools here and Browser.Engine.trident will be true if it's IE, but what about the version number? ...

MooTools. Convert XML (Elements) to String

I need to consume XML based RESTful API. All request are sent in XML format. I've been using MooTools extensions to build XML requests. However, I don't know how to transform it string, so that I could send the XML directly to server. var reqEl = new Element('req'); var loginEl = new Element('login'); var usernameEl = new Element('usern...

Mootools image preloader - make it disappear after load complete.

Im using a preloader to load large images before I display them.. I am using this script: http://davidwalsh.name/mootools-image-preloading-progress-bar I want to make it disappear when it reaches 100% loaded. I have modified the script by adding progressBar.set(0); to the onComplete function at the bottom of the page. However, now t...

in mootools: calling a function after all events on an element is finished

i have this element to which various change events are applied how can i trigger my own function after all change events have occurred in mootools a sample scenario is a drop down list $('ddl').addEvent('change', function () { // some ajax call going on here and which i can't affect // as the page is generated that way }); i now wa...

Element className inside MoodalBox?

On my site I've got a link that opens up a MoodalBox (http://www.e-magine.ro/web-dev-and-design/36/moodalbox/). The page displays fine, but I have an anchor on the page that calls a javascript function to change the className of a div (from hidden to visible). I've debugged it all the way down to the actual function call that sets the ...

JSONP request to stackoverflow with mootools not working

I'm trying to build a custom stackoverflow badge using JSONP and mootools. Here is the code: new Request.JSONP('http://stackoverflow.com/users/flair/166325.json', { onComplete: function(data) { console.log(data); } }).request(); However, I always get back this message: RequestJSONPrequest_maprequest_0 is not defined I'm won...