javascript

Change text box quantity, change picture upon hover with jQuery/Javascript

I would like to do 2 things in jQuery or Javascript, Change with quantity in a text box with up and down arrows. The default qty is 1, and I want to increment by 1 when a user clicks the up arrow, and vice versa. Can I change the arrow to another picture (color) when the mouse hovers on it? Thank you. ...

Splitting a complex string with Regular Expressions

How do I, using a regular expression, split this string: string = "a[a=d b&c[e[100&2=34]]] e[cheese=blue and white] x[a=a b]" into this array: string.split( regexp ) => [ "a[a=d b&c[e[100&2=34]]]", "e[cheese=blue and white]", "x[a=a b]" ] The basic rule is that string should be split at whitespace ( \s ), unless whitespace exists ...

Dynamically adding content to a UI with javascript squashes content below in IE7 and 8

Hi there, can anyone help? I have a simple html file which i am filling via javascript, in firefox all the content below autosizes hence the more content i add the content below (in another div) moves down but in IE it doesn't. I am using overflow set to visible this is the html (part of) - its the id="extras" i am adding to, i am ad...

Charting package that can handle huge amounts of data

Hi, There've been a number of questions on here in the past about charting packages, but I'm looking for one with a specific set of properties. In particular: Ability to handle many thousands of data points Ability to allow users to pan and zoom Ability to do live update of the charts (i.e. to reflect new data) Ideally, it will work...

AJAX & ASP.net, Referencing server controls in external file

I've got some JavaScript in an ASP.NET page that looks like this: var list = $get('<%=Topics.ClientID %>'); I have many functions written now where this syntax is used, and I would like to centralize my JavaScript and move this into an external JavaScript file. This breaks however, since 'Topics' cannot be found. What is the best st...

Javascript:Block form submit on Enter Key press

I have a web page where i have 2 forms when i click the enter key, I am calling a javascript function to force the page to load another page.My code is function SearchUser() { var text = document.getElementById("searchItem").value; text = text == "" ? -1 : text; var by = document.getElementById("listBy").value; var on=""; if(by==1) { ...

how to retrieve data from MySQL using javascript

I have a web page coded in PHP. This page is for posting a request for services. All services are stored in two separate tables along with prices. As the user selects various services I want to fetch prices for the selected service and show it on per service basis and also a grand total of all services. How can we do this? ...

What's an easy way to see what AJAX calls are being made?

I'm looking for something (preferably a Firefox extension) which will allow me to see all AJAX subrequests. Basically, anytime an XMLHTTPRequest() is made, I want to know what URL was being requested and what (if any) GET and POST vars were passed along with it. Unless I'm missing it, I don't see anything quite like this in Firebug or ...

can use javascript in window C#

i want to use AJAX and javascript in window platform ...can i use it in vs 05 C# window? ...

Let user review a file before uploading it

I am programming a control to allow the users of our intranet to upload multiple files into our system, but with some added functionality. Imagine you as a user are uploading N files, when you add N files the intranet presents you a list like this: File_name_1 ..... [View] [Remove] [Upload] File_name_2 ..... [View] [Remove] [Upload] . ...

Dynamic form submission using javascript - how to elegant code?

Here is the problem: My page displays a set of items. Each item has a check box associated to it (which is part of a form). User might check any of these check boxes and press 'Delete' button. The same page also has a 'Upload' button which would upload an excel sheet of items. At the moment, my form action sumbits to say : "xyzAction"...

jQuery autocomplete with images

I want to implement an autocomplete feature with images in my website. I would like to use the jQuery autocomplete plugin. I had a look at their sample code. Can anyone explain me what the below code means in $(document).ready() event: $("#imageSearch").autocomplete("images.php", { width: 320, max: 4, highlight: false, scroll...

Javascript Time Picker like Windows

I am looking for some kind of example of a Javascript Time Picker that is similar to the one used in Windows to pick the time...well except with out the seconds being in their. I have a mockup in place at the moment but trying to figure out how some of the user functionality should be be as it is two inputs and a dropdown. I guess I just...

JavaScript : Simulate Mouse Over in code

I'm attempting to write a vimperator plugin to allow use of hints mode to simulate mouse over on drop down menus. I have the hints mode working and can correctly choose elements that have mouseover events attached. The problem is my function to simulate the mouse over is not working. This is what I currently have: function SimulateMo...

Password Strength Visualizer - Html & Javascript/Ajax

I'm looking for a simple Password Strength Visualizer (like gmail's when you create a new account). I want to show the user how good their password is visually. Does anyone have some source code they'd like to share? :) ...

What is the shortest way of converting any JavaScript value to a string?

I have a function, say: setValue: function(myValue) { ... } The caller might pass a string, number, boolean, or object. I need to ensure that the value passed further down the line is a string. What is the safest way of doing this? I realize there are many ways some types (e.g. Date) could be converted to strings, but I am just look...

Is there a way to convert a VML document to a bitmap image ?

I've been looking for a long time for a way to have a bitmap from a VML document. In fact, I working on a few libs that use the tag, so I have no problem for anything except for IE (of course) because I'm using ExCanvas in IE, but I'd like to have a bitmap from the generated "canvas" (which is in fact VML). I've been looking for a few ...

making a video play continuously even when changing html page with javascript and without frames

I would like to have a video play continuouly even when html page changes.The new google videos page works this way. My page utilizes javascript. ...

What is the difference between JavaScript and ECMAScript?

I was just reading John Resig's ECMAScript 5 post. From what I can work out, ECMAScript is the standard and JavaScript is the implementation. Is this correct? ...

Getting events on embedded objects with javascript

Hi, I'm trying to get events to register when clicking on a flash object, but I can't seem to get it to work. In the below link, clicking on all the other text fields/buttons registers something, but not for the Flash object. Any ideas? http://dl.getdropbox.com/u/139980/flash%20events/flash_events.htm ...