javascript

Determine the length of this Node-set?

Javascript for Mozilla: while (result) { alert(result.childNodes[0].nodeValue); //txt=txt+result.childNodes[0].nodeValue+"<br/>"; result=nodes.iterateNext(); } This is intended to return a series of strings from an xml file. When I use the alert line, it alerts as expected with the proper strings in a series. T...

Chrome Userscripts

I'm having a problem with a Userscript in chrome. I have been using a version of this extension in Greasemonkey for a long time now, but I can't figure out how to parse through a NodeList in Chrome. Here is the code as it is in Greasemonkey (please note that the code on the site is really bad, so that accounts for a lot of my code: fo...

how to code a loading action in flash ?

i am trying to design a website in flash , and would like to know how to design a loading flash movie , something like a circle rotating till the website loads . I might not be able to explain properly , but its like when you install a software , the installation bar that you get , how to get that on a website using flash or java script?...

100% Javascript Web Framework

With the creation of node.js and various other utilities for writing server side javascript and with the MongoDB using javascript as it's primary access method, it looks like all the pieces for a web framework are now in place. Are there any frameworks now using exclusively Javascript? (This means for server side interactions, database ...

What is this Javascript code? Explain

This is a snippet from the Facebook Developers site. <div id="info"></div> <script> var info = document.getElementById('info'), update = function(response) { if (!response.session) { info.innerHTML = '<em>You must login using the controls at the top.</em>'; return; } FB.api( { method: 'fql.qu...

Simple Text Lossless Compression PHP/JavaScript

Is there a way for me to lossless compress text with the following characters(88 in total)? abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789!@#$%&*()-_+=;:'"<,>.?/[]{} I am making a chat but I don't want it to be wasting so much bandwidth(an old chat I used a few hours wasted 800mb). The text would be compressed in java...

Jquery show div when link gets clicked

Im trying to show/hide a div using jquery when a link gets clicked. I put this in my head section: <script type="text/javascript"> $("#attach_box").click(function { $("#sec_box").show() }); </script> I have a link that looks like this: <a href="#" id="attach_box">+ Add a Postal Address (If Different)</a> And a di...

How to go to next page anchor with HTML and/or JS?

Is it possible to use HTML and/or Javascript to automatically work out what the next page anchor is and go to it? Thanks ...

Need help using John Resig’s Simple Javascript Inheritance.

John Resig’s Simple Javascript Inheritance: http://ejohn.org/blog/simple-javascript-inheritance/ I tried to do such thing: var SomeClass = Class.extend({ init: function() { var someFunction = function() { alert(this.someVariable); }; someFunction(); // should alert "someString" }, someV...

Detect Ajax calling URL

I have an HTML document, which loads content from a PHP file using an AJAX call. The important bit of my code is below: default.html : /*more code above*/ var PHP_URL = "content.php"; var Content = document.getElementById('Content'); ajaxRequest = new XMLHttpRequest(); ajaxRequest.onreadystatechange = function() { if(ajaxRe...

Accessing Google maps variable through jQuery

How I can load the Google maps like this: function loadScript() { var script = document.createElement("script"); script.setAttribute("src", "http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=ABQIAAAAAXN1Nhid00zgr5mrYEM7MhQE7kuAsiuX3WD62vgNgdNYG4wQzhQs7fQD8XzGkuXLIejRfouX3li8xg&amp;async=2&amp;callback=loadMap"); script...

Magento : Variable well displayed in javascript. How call it in php in the same file ?

I've built one variable (horaires_lundi) in this file : app/code/community/Unirgy/StoreLocator/controllers/Adminhtml/Locationcontroller.php ->setTitle($this->getRequest()->getParam('title')) ->setNotes($this->getRequest()->getParam('notes')) ->setStreetAddress($this->getRequest()->getParam('street_address')) ->setHorairesLundi($thi...

Run JavaScript when title-tooltip is shown

Hi, I have a page with HTML anchor tags that have the title attribute set. <a href="...." title="Some tooltip text" /> I want to detect when the tooltip is shown, and run some javascript. This is to log that the tooltip has been displayed. Using OnMouseOver isn't enough since it triggers too early. Any ideas? ...

contact form validation problem (Validation is bypassed on send button)

I am using livevalidation script on my contact form.But i dont know what is the problem whenever i click submitt or send button. It just only checks the dropdown selection and other fields go empty and form is validated. I checked every example on livevalidation site but no help. Mine is not working.... It dont check the presense functio...

How do I limit panning in Google maps API V3?

In V2 there was a way to limit panning/dragging so the map stays within certain bounds. How is that done in V3? Let's say I want the users to only look at Europe. I've already limited the zoom, but if I allow dragging (which I have to in this case, for other reasons) then the user can pan beyond the area I want to show. Please give wo...

Tag photos outside Facebook using FBConnect and Wordpress?

Hi! I have downloaded a Wordpress plugin that enables facebook Connect in my site, allowing users to "comment out" and "like" the posts and photos. As most of users are already logged in facebook when they reach our site, is it possible to let them tag their friends in the photos, and save that information so people can later see the na...

jQuery image manipulation

I want to draw gridlines of varying frequency on top of a static image in jquery, any suggestions as to the best/easiest approach - thanks! ...

Creating methods on the fly

Hi I'm trying to author a jQuery plugin and I need to have methods accessible to elements after they are initialized as that kind of object, e.g.: $('.list').list({some options}); //This initializes .list as a list //now I want it to have certain methods like: $('.list').find('List item'); //does some logic that I need I tried with ...

jQuery Tools Overlay Fired onClick of a Table Row? How?

I'm using the pretty straightforward jQuery Tools Overlay setup to load external content into the overlay. Check it out here. Basically, it works by using a standard <a> like this: <a rel="#overlay" href="content.html">Overlay</a>. When you click Overlay, content.html loads in an overlay. Nice and easy! I'm running into trouble because ...

Drupal's JS and CSS optimization error

I started getting errors after I turned on Drupal's performance improvements which pack all the CSS and JS files into single files. The error looks like this: The selected file /tmp/fileO4fjBF could not be uploaded, because the destination js/js_8a69e612be02242c2866a4a19223bd12.js is not properly configured. I'm not sure ho...