mootools

accessing variables and methods of parent javascript object?

var SortingTable = new Class({ initialize: function( table, options ) { this.table=$(table); this.tbody = this.table.getElement('tbody'); //...do alot of things here... }, addTextInput : function(index,headid,options){ var trs = this.tbody.getChildren()...

Extending mootools Element.Events

I'd like to create a custom paste event that would fire either input (FF) or onbeforepaste (IE). I've read pretty much all about creating custom events in mootools, still the event does not get fired in any of the browsers. The extension (took the docs and the 'mousewheel' event as a reference): Element.Events.paste = { base: (Browser...

get form post data in mootools 1.1 response

Hi friends, I m using mootools 1.1 for developing joomla component. i want to get the form posted data in onComplete block. i don't want to set the post data in response. Is it possible? if yes then please reply how can i do that? Thanks in advance. ...

I've learned jQuery, should I go back and learn "proper javascript"?

I'm primarily a server side developer, working professionally with PHP. For javascript I always use a framework (jQuery/mootools), will this be a professional disadvantage for me down the line? Should I put the time in to learning straight javascript, or are most developers moving over to frameworks anyway? Thanks. ...

MooTools vs JQuery

I just inherited some web pages which uses MooTools. I never used MooTools. Now I need to add some functions on the page, I wonder if it's a good idea to use jquery and mooTools on the same page? Basically, I have 3 options, Convert the pages to JQuery, which I have to learn MooTools to do that. Write new functions in MooTools. I have...

Help with Mootools locating the conflict in my ugly code

Hi, I need help in locating the conflict in my code, below is my ugly code (I'm just starting to write my mootools and my approach i think are ugly). the site can be seen here http://tinyurl.com/y9xvm6b. I think it is conflicting with these lines <script type="text/javascript" src="/lotsforsaleroxascity/media/system/js/mootools.js"><...

Filtering and adding class attribute in mootools

Hi, How would I do this in mootools? I have an Unordered list items that I want to add classes to each of them But there are some list item that I want to exclude in adding a new class. here's my markup <div id="header"> <ul id="mainnav"> <li class="item1"><a href="#">Home</a></li> <li class="item2"><a href="#">Ab...

What's the downside of using too much JavaScript?

I would like to know what are some downsides using too much JavaScript code in a web page? For example, I will use a jQuery framework for my dropdown menus, tabs and accordion. And other JavaScripts for my calendar (even-though there is available calendar that uses jQuery) and other JavaScript for other stuff? What is the effect? (My o...

Calling ajax webservice from OnComplete of an ajax webservice call not firing OnComplete 2nd time.

Hi, I have an ajaxified .NET webservice that I call from javascript(mootools) on my ASP.NET content page with a Masterpage firstly to check if the user has associated journalists, secondly to delete the user if no journalists are associated. Both calls to the webservice work, but the onComplete for the second does not in IE8. Using FF 3...

motool statement

i have following statement var my_img = new Element ('img' , {'src' :'progress-green.gif' , 'style' : 'width:50px; border:3px solid red' }).inject(file.element, 'top') ; when i modify the above statement like var my_img = new Element ('img' , {'src' :'+json.get('fpath')+' , 'style' : 'width:50px; border:3px solid ...

mootool display image

i want to display image after it upload using mootools i write following code but it did't work onFileSuccess: function(file, response) { var json = new Hash(JSON.decode(response, true) || {}); if (json.get('status') == '1') { file.element.addClass('file-success'); } else { ...

How do I use the livevalidation javascript library custom.validation function ?

(note: my original question was not linked to my openid - I am reposting here to be able to edit/update/respond accordingly - if anyone with access could remove the original question: /questions/1554916/how-to-use-the-livevalidation-javascript-library-custom-validate-function that woudl be great !!) Heya Folks, I am very new to all of ...

creating a select element via js, focus doesn't work in IE

Hi there! I'm a newbie in js and I'm afraid that i haven't the knowledge to resolve the next issue. If I have a select element ( populated with several options ) already parsed by the browser on the load, the next code works just fine in both IE and FF $('selectId').focus(); but if I create ( and populate it ) the element via js va...

Can I set global fx properties in MooTools?

Is there a way to set some default properties for MooTools effects like duration or transition? That would make it easier to make all those effects like element.tween(); or element.reveal() uniform. ...

create a span and inject image to it

i am new to mootoll what i want is to create a new element span and injuct image to it. i write following code but not working var newElementVar = new Element('span', {'id': 'id_namekhan','text': 'I am a new div'}); var my_img = new Element ('img' , {'src' :'uploading/'+json.get('fpath')+'' , 'style' : 'width:50px; text-ali...

mootools inject function

I have span which i crate like this: new Element('span', {'class': 'file-img', 'html': 'Image'}) I want to inject image to it: var my_img = new Element ('img' , {'src' :'uploading/abc.jpg' , 'style' : 'width:50px; text-align:left' }).inject(file-img, 'top') ; It's not working. Thanks for your help. ...

mootool set value to div

i am using mootools i have div in body with like this <div class="total-title">12</div> total-title i am using for reference. my mootools code is $('total-title').set('text', 'text goes here'); i want to change text of above div. this is not working...? Thanks ...

Mootools Strange bug conflict with jQuery

Hello, Try running the code below: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt; <script> b = jQuery.noConflict(true); </script> <script src="http://ajax.googleapis.com/ajax/libs/mootools/1.2.3/mootools-yui-compressed.js"&gt;&lt;/script&gt; <script> (function($){ $.a = funct...

Problem with access to control properties in Multibox

I used multibox-component to create lightbox-similar div. But I faced problem. I placed textbox with id ‘tbx_position’ in that div. I entered some symbols in textbox and then tried to read value via javascript-function (it had to alert document.getElementById(‘tbx_position’).value). Every time that value was empty. There is example of ...

mootools sortables vs jquery sortables effect

Hello, I've been using mootools for some time and trying jQuery for a week so this probably is a newbie question - though I've found nothing in the manuals. In mootools, when you use the option clone in a sortables list it creates a clone of your image/object that helps you visualize where the image/object will be droppped - works gre...