Is this something with javascript; or is it something else I'm doing wrong.
file1.js
var collection = new Object();
collection.foo = new Array(1, 2, 3);
file 2.js
var someClass = new Class({
bar : function() {
alert(collection.foo.length);
}
});
index.html
<script type="text/javascript" src="file1.js"></scrip...
Do you know of any examples of MooTools and ASP.NET MVC?
...
I have a page in my application that refreshes some content (a list of users currently signed in) from the server every 10 seconds. This data is loaded using the Ajax class from the mootools framework, specifically with Javascript that looks like:
var xmldata = (function() {
new Ajax('xmldata.jsp?time='+$time(), {method: 'get', onCo...
I've downloaded the examples for both the Request and Request.HTML and cannot make either work. I unzipped them to a folder and browsed to their index.html to execute them as is, but the response is always "The request failed." with no clues as to why.
I've played around with them with different permutations and can get the request to c...
Hey everyone,
I'm new to stack-overflow and programming so forgive me for any awkward phrasing!
I am building a side-scrolling website which is graphic-rich, and 680x9400px in size. I will be using some javascript and/or mootools to create a cool side-scrolling effect, similar to http://sursly.com.
I am web optimizing all the images ...
I have any number of anchor links on a page that need to execute the same block of JavaScript code on click, and that code needs to be associated with one value. There are several of these on each page. I usually use a hidden input to store the value in a one-to-one relationship, but what is the best way to associate several links placed...
if you create html layout like so
<ul>
<li class='a'></li>
<li class='b'></li>
<li class='a'></li>
<li class='b'></li>
<li class='a'></li>
<li class='b'></li>
<li class='a'></li>
<li class='b'></li>
</ul>
and try to select odd elements with 'a' class like so $$('.a:odd') you will get empty array...
I have a website where I currently use ASP.NET's built in Authentication, profile and role management. I would like to move some functionality (including authentication) to the client side using a third party javascript library like JQuery or Mootools without the use of ScriptManager and generated proxy classes.
There is very limited in...
I'm trying to target a UL that's inside a LI and I'm having trouble. Here's the HTML:
<ul id="main_nav">
<li class="main"><a href="#">Section 1</a>
<ul id="dropdown">
<li><a href="#">Item 1</a></li>
<li><a href="#">Item 2</a></li>
<li><a href="#">Item 2</a></li>
</ul>
</li>
<li class="main"><a href="#">...
Dear all
I am using the code Mootool[1.11.] and JQuery[1.2.6],Its working fine when these are
separate.
While i am integrating firefox throws (document).ready(){} is not a
function.
Is any wrong in my concept, What to do to rectify it?.Any help
...
Dear all
I am using Mootools 1.11 and Jquery 1.2,
ajax function not work properly for following code
jQuery(document).ready(function($) {
confirm("Hello");
function confirm(message){
$.ajax({
url: 'ajax.php',
....
}); ...
I am using fValidator plugin for MooTools, and find necessary to control (depending on user selections) the required class it's used by the plugin.
The class uses a weird formatting which have never used before and for some reason mootools can recognize it. It probably has something to do with escaping the square brackets and the singl...
I have hidden input type=file field, and i want to open its select dialog with javascript. I tried to fire click event on this element, but without luck.
Im using mootools.
$('input_id').fireEvent('click');
This is possible at all?
...
I've got a couple of divs in a page which hold simple HTML & images. The divs each have unique ids.
I'd like it so that when the page loads the contents of the div are say, 60% but on mouseover the fade in at 100%. On mouseout they would go back to 60%.
The site is built in Joomla 1.5.x so already loads the mootools 1.11 library. I was...
Hello,
I am a bit of a beginner with javascript and I can't think of a way around the folowing problem. I am using Mootools in this example, though this is not a Mootools question:
for (var i = 0; i < 5; i++) {
myElement[i].addEvent('click', function () { otherFunction(i); });
}
Whenever someone clicks on myElement, otherFunction...
I'm trying to use this code to add an anchor element and set it's onclick event to some Javascript. But no event is being loaded. Looking at the DOM through Firebug tells me that Mootools is indeed added. The element has almost all of the Mootools element functions. But it lacks addEvent.
var delete_ctl = new Element('a',
{
'hr...
I'm trying to add an element to an array only if it doesn't already exist in the array. I used to do this with the Array.include method of mootools, but now I'm using jquery.
Is there a method to do this in jquery?
http://mootools.net/docs/Native/Array#Array:include
...
I'm interested in alert boxes such as,
http://www.visual-blast.com/javascript/nice-alert-box-with-jquery-impromptu/
and
http://woork.blogspot.com/2008/08/design-stunning-alert-box-using.html
but with a different functionality, the user should be able to interact with the page even with the alert box present, so it needs to be movable...
I'm wondering if anyone has ever come across a plug-in for mootools that will show a hidden div (with embedded video in it) as a light box, upon a click on a link.
What I wanted is somehow like how apple trailers site show the embedded quicktime player.
...
I try to manually build a Json string to send to the client.
{'result':'hhh'}
When I use
echo json_encode(array('result'=>'hhh'));
It arrives perfectly.
But when I do
echo "{'result':'hhh'}";
It isn't
The only difference I find between the two requests is that the first one has:
Content-Length: 9 header
and the second o...