mootools

preg_match in JavaScript ?

Hello ! Is it possible in JavaScript to do something like preg_match does in PHP ? I would like to be able to get two numbers from string: var text = 'price[5][68]'; into two separated variables: var productId = 5; var shopId = 68; Edit: I also use MooTools if it would help. ...

mootools recursive remove class

I want to remove classes in the particular div. I mean i have to remove the classname called "highlight" in the div id called "result". In the onclick event i want to remove all the "highlight" classes. How can i do it? Please help me ...

Is there an easy way to remove mootools namespace pollution?

A clientside javascript library I've developed uses objects as hashes in some areas. It loops through objects parsed from Json data with a for...in loop using the property name as a key. eg... (pseudo code) var conversations = {'sha1-string':{name:'foo',messages:[]}} for(var id in conversations){ console.log(id); console.log(c...

How to embed HTML via JS embed code.

I need to give the user a snippet of js code that will insert some HTML code into the page. I'm wondering what the best method to do so is. Should I use document.write, should I just create all the HTML elements via DOM programmatically? Is it possible to use a js library? I can see conflicts occurring if the webpage the code is embed...

Get div's size with mooTools

Hello ! I have some <div id="text">abc</div>. Is it possible to get it's size using JS/mooTools (width and height) when I did not set it with CSS ? ...

Mootools 1.2 Custom Tooltip Error - Tooltips show image before hover

Hey all, Having a bit of an issue woth mootools 1.2 Tips (cutsom tooltips) We are using Joomla with the latest update that includes Mootools 1.2 - and I have the following JS code $$('.tipz').each(function(element,index) { var content = element.get('title').split('::'); element.store('tip:title', content[0]); ...

MooTools - How to use getSelected()

Been searching for this for over a day on google without any answers. Finally putting fingers to keyboard for this. So frustrating! I'm trying to learn MooTools and am a TOTAL javascript noobie so please be gentle with me. Okay, what I'm tying to do is to change the state of a disabled input field (type is text) when a particular optio...

Is there a way to emulate the mootools "domready" event without needing the full framework?

Is there a way to emulate the mootools "domready" event without needing the full framework? I want some javascript that decorates some of my textboxes to run before the onload event because i'm seeing a flicker of the un-decorated boxes before it runs. Ideally i'd like to hook in as the page is loaded but before it is displayed. And i ...

Javasript/MooTools - Better to save element in object property vs. accessing each time with $('elem')?

In terms of speed/memory efficiency, does it make sense to save an element (retrieved via $) to a variable in an object or use $ to access it each time? Does accessing object properties (especially if nested a few levels - object within object) perform faster than using $? ...

is there a way to make the browser reload my javascript code after an ajax call

how can i make the browser re-evaluate all my javascript after i make an ajax call. i am using mootools framework and i would like to reload the javascript added at the header portion of my html page ...

Can jQuery and Mootools work together??

Can jQuery and Mootools work together?? If not when is that case? thank you ...

Mootools WMD editor doesn't properly quote content

I'm using the mootools WMD editor but it seems like there's an error in the script and it doesn't properly format selected content after I hit the quote button. ...

mootools & nodejs

can i use mootools on the serverside with nodejs? If so, can someone give an example? ...

How can I use the addonblur setting on the Mootools TextBoxList?

I am using Mootools TextBoxList for a project. I was attempting to set the addonblur option so new tags entered would automatically be added to the list when the text box looses focus. However, I am unable to determine the correct syntax for how to set this. I read the documentation several times and tried different things, but couldn’t...

mooflow overlapping images

Hi, I am using one of mootools plugins, called Mooflow. Everything works fine, except overlapping image issue. http://mootools-users.660466.n2.nabble.com/Moo-Problem-with-Mooflow-td3174068.html I have a exact same issue with above link. has anyone figured it out? THanks. ...

Is Plain vanilla Javascript better than using frameworks like jQuery/mootools ?

Hi All, I am wondering if it is a good idea to rely on frameworks like jQuery/mootools or should we just use plain javascript ? Apart from avoiding the re-invention of wheel, do they add any specific value ? Since the frameworks are open to public, can there be possibility of exploitation of any security holes that might appear(of cou...

jQuery No Conflict mode doesn't work

On my page http://all-fours.pl/ I'm using moo.fx for.. something, I don't really know what. And now I was trying to add a jquery banner rotator. But still regarding fact that I'm setting my banner script in jQuery.noConflict(), the moo.fx library gives errors : function to set the jquery cycle plugin: <script type="text/javascript"> jQ...

Increasing value of Javascript Variables?

Hello! im processing link click events with mootools. in my html i have a links with the id of this pattern: toggle_NUMBER e.g. toggle_1 now i get the id with this peace of code var id = $(this.get('id').replace(togglePrefix,emptyPrefix)); my problem starts now: i remove the prefix this way var togglePrefix = 'toggle_', boxP...

Mootools Click Event Problem

Hello! This peace of code works for the first click. but then it seems to not be able to get new ID from next click. the idea behind it is to show one piece of a form and with click on a button it hides first and shows second part. any idea what im doing wrong? i guess it has something to do with "this" but from my understanding it shoul...

Mootools: How to make cross-browser chose option menu?

Mootools: How to make cross-browser chose option menu? 1 show just selected option 2 onclick on v show all option list (timeout delay) 3 onclick on different option, replace selected option <ul> <li class="selected">A<span>v</span></li> <li>B</li> <li>C</li> <li>D</li> </ul> Thanks very, very much! ...