javascript

get total of all input values with jqeury

Hey, I need the total of all the values from my input, the result must be displayed in the input field total that is readonly. The user can enter 1 or more values. The problem is that my var value is not correct, and how can i return the value immediately by onchange? script type="text/javascript"> $(document).ready(function() { $("...

start to load on click()

i want some content to start loading when i click on a link. i dont want it to use any bandwidth before i click on that link. also how to implement that rotating cursor animation that is seen in almost all lightboxes? ...

Porting JavaSript application into the Silverilight (XML/XSLT/HTML vs. XAML)

We are in the process of porting existing JS application to the Silverlight. You can imagine application as a some kind of document management application: 1.) Documents are stored as XML documents. 2.) Documents can be of different types. Document types can be added without source code modification (everything is in the DB or FS). - Eac...

Setting css properties with javascript not working on strict mode?

I'm embarassed to admit that I can't find the standards-compliant method to modify CSS properties using Javascript. Or at least, I assume so, due to the following: The following piece of code works fine in Firefox/WebKit without a DOCTYPE declaration, but doesn't work with the doctype specified (either HTML 4 or 5): function setWindowS...

How to get a Select/Options List if I don't have a Form in the DOM

Hi. Got the following chunk of Html... <div style="visibility:visible" id="stateProvinceDiv"> <div id="stateUSALabelDiv"><label for="stateUSAIdSelect">Find Your Bookstore</label></div> &nbsp;<select size="1" id="stateUSAIdSelect" name="stateUSAId"> <option>Loading...</option> </select> </div> The page/content for the ...

Unexpected token ILLEGAL javascript error in Google Chrome

I am getting a javascript (prototype.js) error: Unexpected token ILLEGAL at this line of code: newFriend = new friend( response[0].@items[0]._id, response[0].@items[0]._nickName, response[0].@items[0]._profilePicture, response[0].@items[0]._tagLine, response[0].@items[0]._isInvite, response[0].@items[0]._con...

How do you get the Url Referer via a javascript include?

If I search for something on google and click on a result (mytestsite.com), the referer to that site will be URL of the google search. Now on that site, there is a JS file include that is used for tracking purposes..however the referrer to that JS file request is mytestsite.com...is there no way for the server handling the JS request to...

Why is error coming up for TinyMce blog editor?

I have installed the TinyMce blog editor to my site. When the compose blog page loads a I get a pop up that has the yield sign and says "Developer Key Validation Failed" Anyone know what this is? <script type="text/javascript" src="javascripts/jquery/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="http://www.cysticlif...

javascript document height complications

Mozilla & IE developers seem to have simultaneously changed the implementation of their height elements to represent the Opera implementation... which I previously did not have to worry about. var height = (document.height !== undefined) ? document.height : document.body.offsetHeight; When performed on a blank document now returns 0 as...

JQuery - how to use the hover() event on a list of DIVs?

I have the following HTML: <div id="panel"> <div class="listing" id="ref_1">...</div> <div class="listing" id="ref_2">...</div> <div class="listing" id="ref_3">...</div> <div class="listing" id="ref_4">...</div> </div> What I should like to do is, when someone hovers over a div.listing, to alert() to the screen the id name. M...

wms configuration

hola a todos, tengo probleas con este linea , ¿Como configuro un servicio "WMS"? var mapser = new OpenLayer.Layer.MapServer("Campus","http://my.host/cgi-bin/mapserv",{'wps/mapa.map'}); gracias por cualquier repuesta ...

Javascript Dojo AJAX (XHR) Requests with Custom Headers in Firefox

I'm trying to make a request using dojo.xhrGet to grab some XML data from a server. I'm using dojo 1.4.0. The server requires that I pass credentials through a custom HTTP header called Myauthtoken. Everything works fine in Safari. The code pops up a dialog showing [object Document]. But in Firefox, the dialog shows null. Somewhere ...

jQuery: How can I add line break to form input?

I'm collecting information in a standard HTML form. I have, for example, <input type="text" name="UserName" id="name"/>. When the form is submitted, I want to add a line break to the value entered. So if the user entered "foo," the form would submit the value "foo\n." Here's the jQuery function I'm using: $("#formID").submit(function (...

common reasons for javascript reference error with prototype

I am new to the prototype framework and fairly new to Javascript (it's been a long while sicne any heavy javascript work). I have defined a class that is calling another method within it and I keep getting a ReferenceError "getLabel is not defined". getLabel is another class method that I am trying to call. Here is the code where I am ca...

JavaScript: DOM text nodes

Take a look at the snippet below. Does it create a text node for the string "test" in the DOM? Can I select that node with jQuery for MooTools? <div id="foobar"> test <img /> </div> ...

jQuery tablesorter - sorting a column with mixed text and numbers

I have a table with a column of data that is mixed text and numbers. I'm sorting it using jQuery and the tablesorter plugin. The data that won't sort correctly is equipment tags, for example, "AHU-1", "AHU-2", "AHU-10". The problem is, given those example values, AHU-10 will be placed between AHU-1 and AHU-2. I've found forcing a 'digi...

Is it possible to listen to a "style change" event?

Is it possible to create an event listener in jQuery that can be bound to any style changes? For example, if I want to "do" something when an element changes dimensions, or any other changes in the style attribute I could do: $('div').bind('style', function() { console.log($(this).css('height')); }); $('div').height(100); // yields...

Enable/disable asp.net validator controls within a specific "ValidationGroup" with jQuery?

I know how to enable/disable individual validator controls on the client side using ValidatorEnable(validator, false); But how do you enable/disable all the validators within a ValidationGroup? ...

jQuery: Evaluate script in ajax response

XML responses from my webapp have both HTML to add to the page AND some have a script to run. I'm trying to send back XML from my webapp like: <?xml version="1.0"?> <doc> <html-to-insert> <![CDATA[<p>add me to the page</p>]]> </html-to-insert> <script> <![CDATA[ alert('execute me'); ]]> </script> </doc> What I'm doin...

JavaScript DOM references not holding up

For some reason ss.transition() does not affect the appropriate DOM elements after ss.goTo() is triggered by an onclick. The ss.transition() call under //Init does work as expected. I assume this is a scope problem. Little help? var ss = {}; ss.goTo = function(i) { ss.old = ss.current; ss.current = ss.slides[i]; ss.transiti...