mootools1.2

how to replace broken images in webpage with some error image with mootools1.2.

Hi, i am running on php, mysql and using mootools1.2 as my js framework. I want that all broken images should replace with a single error image. How should i do this. Thanks Avinash ...

create a new option and inject into select box using mootools 1.2

Hi i have one AJAX function which return the list of countries. It works fine. My problem is that want to load that countries in on select box which is already in HTML and is empty means no option value in it. I want to know that how can i create a new option element and inject into the select box using moo tools 1.2 I have used be...

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? ...

document.body is null

I've got a page where I'm using Mootools 1.2.4 and MediaboxAdvanced as a lightbox. I can't seem to get the thing working because of a particular javascript error document.body is null at the initialization of Mediabox: $(document.body).adopt( $$([ overlay = new Element("div", {id: "mbOverlay"}).addEvent("click", clo...

Sort list box options using mootools1.2

Hi all Below is my HTML <select name="name" id="id"> <option value="1">ZZZ</option> <option value="1">PPP</option> <option value="1">SSS</option> <option value="1">AAA</option> </select> I want that this select box will be sorted according to below. <select name="name" id="id"> <option value="1">AAA</option> ...

fetch HTML Element object using javascript, mootools

Hi, Please check my HTML below: <table cellpadding="0" cellpadding="0" border="0"> <tr> <td> <div class="toogler">Demo1</div> </td> </tr> <tr> <td> <div class="element">Demo1 Content</div> </td> </tr> <tr> <td> <div class="toogler">Demo1</di...

problem on ajax call

hi i am using mootools ajax request in my project. its works properly but when i make request for it aborted first time and second time request mad. consequently abortion of request increase by one at each click. my code is following function addStepConfiguration(id,mystrip,comment,error,submitid) { // alert(id+'\n'+mystrip+'\n...

find the position of the cursor where user have clicked and display one div where user have clicked.

Hi all, I want to determine the position of the cursor where user have clicked. And display one div at bottom side of the page where user have clicked. For example on stack over flow home page if some one click on the logo. Then the div should be displayed at the bottom position of the logo. Same way if i click on the bottom link th...

General Web Programming/designing Question: ?

hi, I have been in web programming for 2 years (Self taught - a biology researcher by profession). I designed a small wiki with needed functionalities and a scientific RTE - ofcourse lot is expected. I used mootools framework and AJAX extensively. I was always curious when ever I saw the query strings passed from URL. Long encrypted qu...

How can I get the size of a file using JavaScript (preferably using MooTools 1.2)?

How can I get the size of a file using JavaScript (preferably using MooTools 1.2)? ...

Mootools 1.2 $extend

my code index.php var MyObject ={ method1:function(){...}, method2:function(){...}, method3:$extend }; MyObject .extend(MyObject ,Events.prototype); MyObject .extend(MyObject ,Options.prototype); MyObject .extend(MyObject ,Chain.prototype); windown.onload = function() { MyObject .method1(); } at first load , no problem. Th...

how to determine when a request in completed in mootools?

Hi, I am new to moootools and I am creating a Template class,This is my code - var Template = new Class({ Singleton : true, template : '', /* gets the component type template */ get : function(componentType){ var tplUrl = Core.getUrl('backend') + 'response/' + componentType + '/get_template.php', that = this, ...

Mootools return to top of containing div?

I use a mootools-based pagination which works fine. However, I would like after a user clicks to a new page (from the bottom where the pagination links are clicked) to return the new set of comments and scroll back up to the top of the container div. Is there a function to do something like that with mootools? Here is the code that ne...

mootool event delay on specifed timing

hi, anyone come across a code that only fire event when the mouse enter the element for certain time ? but won't fire event if only hover or passed thru the element quickly.. ...

How to create MooTools class of a variable name

Consider this code: var Someclass = new Class(); var Anotherclass = new Class(); var classes = ['Someclass', 'Anotherclass']; and I want to create mootools class with a dynamic name. Of course i can do it by eval: eval('var obj = new ' + classes[0] + '(params);'); but I do not think it is a good solution. How to do this in a "prope...

Two button submit breaks other events on page (mootools).

I am wanting to use two button form and created the following which works. It however breaks any other events on the page but I can't figure out why. Is there a better way? window.addEvent('domready', function() { $('vote1').addEvent('click',function() { new Element('input', { 'type':...

mootools conflicting with iepngfix.htc

Hi all, I have just placed iepngfix.htc to fix the PNG problem in ie 6, but when I include the mootools 1.3 png fix is not working. Do you have any fixing code for this? Thanks Avi ...