javascript

How do I POST XML data to a URL via JavaScript in an Adobe AIR app?

I'm writing an application that downloads an XML string from a URL and POSTs that to another URL (that's set up to handle an incoming "XML" field). I've got the first part right - it downloads the XML and I can alert() it and all that, but I'm unable to figure out how to POST that data to a server. function pull() { var myLoader = n...

Good books/resources for learning web programming.

I am a beginner & wanted to know good tutorials to get myself started with javascript,html & other web programming related stuff. many thanks. ...

javascript inheritance

I know there is a lot of similar questions are tons of great answers to this. I tried to look at the classical inheritance methods, or those closure methods etc. Somehow I consider they are more or less "hack" methods to me, as it doesn't really what the javascript is designed to do. (Welcome anybody correct me if I am wrong). OK, as lon...

possible to see where visitors are moving their mouse on website using javascript?

i know that there are websites which can detect where the mouse is moving on the screen on a website, and then display a movie of that visit. like robotreplay or clicktale. how do they do that? ...

Check this web optimization report - how can I fix it?

Hi guys I ran the analyser on http://www.websiteoptimization.com/services/analyze/ and I got a number of issues the most prominent are the ones below: *TOTAL_OBJECTS - Warning! The total number of objects on this page is 93 which by their number will dominate web page delay. Consider reducing this to a more reasonable number. Above 20...

Short-cut in textarea

I'm trying to write a text editor. I'd need to: be able to understand what text is selected so that a shortcut could work in the correct portion of text, just like in this editor, if I select a word in the middle of the text and then press Ctrl+B Be able to catch when some keys are pressed like this Ctrl+B and TAB any hint? ...

What’s the difference between "Array()" and "[]" while declaring a JavaScript array?

Whats the real difference between declaring an array like this: var myArray = new Array(); and var myArray = []; ...

Detect if IFRAME's document is malformed

I'm loading a page into an IFRAME, and I would like to know if the download was incomplete .. and the HTML is malformed, and missing the closing tags like </body> and </html>. Is there any way to detect this in JavaScript? ...

using jquery to insert javascript (for Quicktime) into a <div>

Hiya, I'm pretty new to javascript and programming and have run into a brick wall with my project. I have a div which contains the javascript to embed a quicktime player, when the page is first loaded no .mov file is pointed at by the page so a placeholder div is 'unhidden' and the player div is set to style.display = 'none'. So far so...

Google Maps - load window on marker click

I'm trying to create a Google Map with multiple markers on it, that loads an alert when a marker is clicked. var map = null; function setupMap() { map = new GMap2(document.getElementById("map")); map.setUIToDefault(); map.setCenter(new GLatLng( 0, 0 ), 1); map.enableDoubleClickZoom(); // Create the marker icon - will be repea...

Getting jQuery to work in Jetpack

Hi, I am experimenting with Jetpack and I would like to parse all the years in a given html page and then wrap the year with a link to the Wiki page. I tried the code in jquery and there it works but now I am using it in Jetpack and it gives an error $(doc).replace is not a function. I am definitely new to Jquery / Jetpack so maybe I am ...

Auto Restart/Reset countdown timer

What i want is that when the timer has reached the end-date and time it automatically start over but by counting down from 60 seconds. Im new to jquery and im strungling with this problem for almost 3 days and i cant get it running. My countdown is working perfectly with the end-data inserted from the database but when it reaches the end...

How to free memory from a looped object

I am trying to dynamically update a tooltip made with Prototip and Prototype. The way I am trying to do this is probably not the best way (so if you know a better way that would be helpful), but the only way i could think to do it would be to hold the javascript in a div element and update the javascript inside the div element in order ...

How to prevent buttons from submitting forms

In the following page, with Firefox the remove button submits the form, but the add button doesn't. How do I prevent the remove button from submitting the form? <html> <head> <script type="text/javascript" src="jquery-1.3.2.min.js"></script> <script type="text/javascript"> function addItem() { var v = $('form :hidden:last').attr('nam...

JavaScript event handler to initiate after 3 seconds

I need to initiate the event handler after 3 seconds of being focused on an image. How should I go about it? Also, I need to trigger another event handler, when I am at a particular part of an image, say the approximate middle of the image. How do I do this? ...

Do javascript developers need to know jquery?

If you were to hire a javascript developer would you expect them to know jquery? I just started using stack overflow this week and knew that jquery led the pack, but didn't realize the extent of it until I noticed that MooTools (my favorite) has 59 questions while jquery has over 4000. (of course, a good statistician could attribute jqu...

GMap - onrightclick event not firing if cursor not on top of a marker

You can replicate the bug here: http://www.trailbehind.com/node/1148091 For some reason, the following event will fire only if the user's cursor is over a marker, but I have seen it work properly elsewhere, and I'm not sure what's messing things up on my site: GEvent.addListener(map, 'singlerightclick', function(latLng, src, overlay) {...

Help submitting a form to a JQuery script using a javascript submit() function

I attempted to ask this question last week without a resolution. I am still unable to get this to work. What I would like to do is submit data entered through a WYSIWYG javascript editor to a JQuery script I have that will first tell the user if they are trying to submit an empty textbox The last thing I need it to do is tell the user if...

How are local variables referenced in closures?

I am reading an article (JavaScript Closures for Dummies) and one of the examples is as follows. function buildList(list) { var result = []; for (var i = 0; i < list.length; i++) { var item = 'item' + list[i]; result.push( function() {alert(item + ' ' + list[i])} ); } return result; } function testList() { var fnlist ...

make html image area ‘coord’ blinking or glow …

i trying to make html image <area coord tag more clear to viewer. any javascript sample to make those coordinate blinking effect or similar as long as it each coord is clear to viewer? p/s: problem with paste < area .that why you didn't see the full of my message.sorry repost ...