Skip to main content
63 votes
5 answers
107k views

Cross domain iframe issue

For say i have a Site called example.com on which iframe is embedded of domain iframe.net, now i want to read the content of iframe and pass some parameter to display a textual message. Like Hi with ...
Kunal Vashist's user avatar
208 votes
11 answers
216k views

event.preventDefault() function not working in IE

Following is my JavaScript (mootools) code: $('orderNowForm').addEvent('submit', function (event) { event.preventDefault(); allFilled = false; $$(".required").each(function (inp) { ...
sv_in's user avatar
  • 14k
543 votes
28 answers
692k views

Comparing date part only without comparing time in JavaScript

What is wrong with the code below? Maybe it would be simpler to just compare date and not time. I am not sure how to do this either, and I searched, but I couldn't find my exact problem. BTW, when I ...
moleculezz's user avatar
  • 7,703
252 votes
28 answers
1.5m views

Uncaught SyntaxError: Unexpected token : [closed]

I am running an AJAX call in my MooTools script, this works fine in Firefox but in Chrome I am getting a Uncaught SyntaxError: Unexpected token : error, I cannot determine why. Commenting out code to ...
trobrock's user avatar
  • 47.2k
20 votes
3 answers
29k views

jQuery and MooTools Conflict

Okay, so I got jQuery to get along with MooTools with one script, by adding this at the top of the jQuery script: var $j = jQuery.noConflict(); and then replacing every: $( with $j( But how ...
flipflopmedia's user avatar
89 votes
3 answers
87k views

CSS selector for targeting only immediate children and not other identical descendants

I have a nested sortable list that can have items dynamically added or removed and can be nested n-levels deep. On nesting, a new ul element is injected into whatever li element is selected to be the ...
VirtuosiMedia's user avatar
41 votes
5 answers
28k views

How well does jQuery support backward compatibility?

We have had issues with Mootools not being very backward compatible specifically in the area of drag and drop functionality. I was wondering if anyone has had any similar problems with jQuery not ...
Josh Mein's user avatar
  • 28.6k
32 votes
4 answers
14k views

Javascript detect scrollbar in textarea

I was wondering if anybody knows how I would go about detecting when the scrollbar appears inside a textarea. I am currently using mootools for my JavaScript and I am having issues getting it to ...
Jamie's user avatar
  • 1,044
43 votes
4 answers
27k views

Retrieve width/height of a css3 scaled element

I'm fighting against an oddity (I think) of the offsetWidth property. this is the scenario: I've got, let's say, a span tag, in my js, at a certain point I perform a css3 transform to this element, ...
holographix's user avatar
  • 2,527
30 votes
5 answers
78k views

Change the options array of a select list

Is there a way to change the options array of an html select list using javascript or mootools? I need to replace the entire options set with a new one. In my ajax response I receive an array ...
cksrc's user avatar
  • 2,307
23 votes
1 answer
24k views

Adding event to element inside Google Maps API InfoWindow

I want to put a form with input field and submit button inside a Google Maps API (v3) InfoWindow. When submitted I would like to call a function that initiates the directions service using the ...
timwjohn's user avatar
  • 377
18 votes
6 answers
8k views

a simple question on jquery closure

what does this mean? (function($){ })(jQuery); to make the question clearer, what does wrapping a function in parenthesis mean in JS (sorry, I'm a bit confused on the concept of closures). What ...
yretuta's user avatar
  • 8,083
11 votes
2 answers
9k views

How can I focus on an input field when a phonegap page loads?

I would like to focus on a text input in a PhoneGap application when the page loads. I have tried the MooTools version $('entry').focus(); and document.getElementById('entry').focus() when the DOM is ...
827's user avatar
  • 5,223
99 votes
3 answers
173k views

Simplest way of getting the number of decimals in a number in JavaScript [duplicate]

Is there a better way of figuring out the number of decimals on a number than in my example? var nbr = 37.435.45; var decimals = (nbr!=Math.floor(nbr))?(nbr.toString()).split('.')[1].length:0; By ...
PhilTrep's user avatar
  • 1,631
12 votes
4 answers
5k views

Retrieving percentage CSS values (in firefox)

I have a problem retrieving the exact css property value (in '%') on firefox. Suppose we have this extremely simple markup: <div id="box">box</div> and this css: #box{ width:200px;...
stecb's user avatar
  • 14.7k

15 30 50 per page
1
2 3 4 5
14