I need to send bunch of commands to the server on timer - like:
put(0,"hello")
del(4,1)
put(4," is around the corner")
so I need to monitor and record all of the user input and compile/flush it on the timeout (idle), something like macros.
I can record all things happening onKeyUp/onKeyDown/onMouseDown/onMouseUp using textarea curso...
I recall seeing a web site that when you highlighted/selected text on their page, it produced a small balloon just to the upper right, which was clickable and would perform some action when clicked. I have an application where this type of interface would be appropriate for my users. But... I haven't any idea what to call this widget n...
Does the iPhone browser have special events that I can hook into with Javascript? For instance, if the users slides to the left, I would like to perform a certain action. If there are events like this available, it would be nice to see a reference for all of them. ideally, there will someday be a standard for all touch-screen mobile b...
(This question is similar to this one, but it's for using XMLHttpRequest instead of an iframe for Comet.)
I'm starting an async long poll like this:
var xhr = new XMLHttpRequest();
xhr.open('POST', url);
xhr.send();
If I do this inside <script>...</script> in the head, it will cause the document to keep loading forever. (I'm testing ...
I have two form inputs which display the calculated invoice subtotal and total of a form.
The problem I'm having is it's not displaying 2 decimal places.
Subtotal function
function calcProdSubTotal() {
var prodSubTotal = 0;
$(".row-total-input").each(function(){
var valString = $(this).val() || 0;
prodS...
I have a field with a 1:N relationship with some other fields. I need the user to specifier how many elements are related to that particular field to enable me create the right amount of controls dynamically through JavaScript of JQuery.
I dont want to have the user enter the data repeatedly.
How can i create these controls please?
...
I have a code setup something like below, the image is part of a block of HTML and is being loaded with AJAX so I can't get a direct handle on it using it's class or id, so I'm passing the object into a function and then picking it up with jQuery from there.
I don't like this method, is there any way of registering the image (or prefera...
I'm having trouble understanding why a click event binded to the document would be triggered through an 'enter' form submission. Here's the test page I'm looking at:
<html>
<head>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js'></script>
<script type='text/javascript'>
...
Hi,
I want to attach a function to a jQuery element that fires whenever the element is added to the page.
I've tried the following, but it didn't work:
var el = jQuery('<h1>HI HI HI</H1>');
el.one('load', function(e) {
window.alert('loaded');
});
jQuery('body').append(el);
What I really want to do is to guarantee that anoth...
I'm working a web page where I'd like to run some Javascript code when a user alters text in a given input field, but I can't figure out which event to trap (assuming one exists) that would give me the behavior I'm looking for. onFocus happens too soon -- if the user selects the field but doesn't change any text, I don't want anything t...
We're writing an extension for Google Chrome, which only consists of inserting a Flash object in the HTML content. This FLash object generate public external events that can be trapped in JavaScript. Events are correctly trapped if in a normal HTML page, but inside the Chrome extension, it doesn't work.
It's like Chrome is blocking an...
I'm having trouble with some JavaScript that I've written, but only with Internet Explorer 8. I have no problem executing this on Internet Explorer 7 or earlier or on Mozilla Firefox 3.5 or earlier. It also executes properly when I use compatibility mode on Internet Explorer 8.
What I'm doing is overriding the Enter keystroke when a use...
I have a HTML form with a couple of radio buttons. The first few are normal radios, but the last one is associated with a text box. I'd like to run some JavaScript validation to warn users when they select "other" without providing a value using the text box.
Functional HTML + JS is linked below, but the rough outline of the HTML is:
<...
Hi!
Is it possible to have an event that fires when the value of a certain variable changes?
Thanks!
...
I am fairly new to JScript and I am looking for a way to subscribe to the event when a textbox is disabled or enabled. I am creating a AJAX Extender Control and I am subscribing through the JScript:
$addhandler(textbox, 'EventName', Function);
I have it working for "click", "focus" and "blur", but I'd like to get enable disable worki...
i have a asp.net dropdownlist control with onclick and onchange event javascript.
both works in IE,mozilla, Opera and google chrome but not in safari.. when i remove onclick, onchange suddenly works.
The reason i use onclick is to get the value of the dropdownlist before it change. Is there a way i can do that without using onclick? i m...
I want to write a user script that runs some custom JS on each <input type="password"> field that gets loaded. I could register an event handler on document load to look for all input fields and run the JS on them, but that means firstly that the JS won't run on input fields that subsequently get added by other JS, and secondly it won't ...
How can I do with jQuery so that a mousemove event is active only if the left mouse button is being kept pressed, and as soon as the button gets released the mousemove event stops?
...
I need to trigger the click event on a link and then, if none of the listeners prevented the default, change the location.
This is what I've got so far:
var $el = $('a#my_special_link');
var onClick = $el.attr('onclick');
// Hack to capture the event object
var ev_reference;
var ev_capture = function(ev) { ev_reference = ev; }
$el.bi...
Hi,
I'm writing a Javascript add-on (not in jQuery) which starts working when a certain event has been triggered. It works fine on most of the sites, but I encountered problems in sites that use stopPropagation().
Is it possible to bypass this and attach the event anyway?
Thanks!
...