javascript

Client-side verification of credit cards

Does anyone have a library or JavaScript snippet to verify the check digit of credit cards before the user hits Submit? ...

Remove the default browser header and footer when printing HTML.

I got an HTML with the <body onload="window.print()">. The question I'm trying to ask is: Is there any way to remove the strings that the web browsers add to the printed page? Such as: Web site from where the page was printed Page count Title of the web page Date of printing ...

How can I set up a timed interval in javascript?

The following javascript should setup an interval so a new item from the list of json objects will be added to the top of the list slowly, but instead they are all added at the same time. <script type="text/javascript"> var json; var count = 0; $(document).ready(function() { $.ajax({ type: "POST", url: "/Home/PublicTimeLine",...

Javascript debuggers for low-marketshare browsers

I am working on a web application that needs to support the widest possible audience. I have errors popping up in Konqueror that don't occur in major browsers. So I'm curious, are there any JavaScript (or CSS for that matter) debugging tools for any low-market share browsers, or is there some platform agnostic way to ensure proper execu...

Does a tool exist for dynamically altering running javascript in a browser?

Does a tool exist for dynamically altering running javascript in a browser? For example, to change the values of javascript variables during runtime. ...

Javascript Drag and drop

Hey there, I'm looking for someone to explain how to drag and drop in javascript, I want a horizontal line with some customizable images in it. I've had a look at the online tutorials for these but find them very hard to use. thanks for any help. ...

Advice on which modal popup to use: ASP.NET AjaxControlToolkit vs jQuery plugin vs Greybox vs ?

This is all being done in an ASP.NET web forms application: I need a modal popup that will show the user a preview of images that match a search criteria (e.g. they search for "dog" and the popup shows them all dog-related pictures). The search results shouldn't be too long, but the popup should support the ability to scroll if necessa...

How to read text from a textbox and make some of them a link?

I will show the problem with a example. There is some text in the textbox such here: Hi! this is a example [lnk]text[/lnk] When i push the submit button and publish this text, the word in the [lnk] and [/lnk] tags must be a link like this www.mysite.com?link=text. How do I make it easily with javascript or jquery? Note: I'm not so ...

How to implement such tool-tip in open-flash-chart 2.x

i think what i need is the tooltip like the tooltip in 1.x the magicword #tip# 's function. ...

How can I set up a callback to run *before* a jquery animation?

I'm trying to set up a loop where an animation runs a certain number of times, and a function is run before each iteration of the animation. The timing ends up being off, though -- it runs the callback n times, then runs the animation n times. For example: for (var i=0;i<3;i++) { console.log(i); $('#blerg').animate({top:'+=50px'},7...

Calling Webservices in a loop won't execute the custom OnSuccess function

Hi there, I have a problem. I am coding using VS2008. I am calling webservices from my Javascript Page. An example Services.ChangeDropDownLists.GetNowPlayingMoviesByLocationSVC( blah, OnSuccessMoviesByRegion, OnError, OnTimeOut ); after execution it goes to the function OnSucc...

Why is the WebService not working?

function AddTheatres() { Services.AdminWebServices.AddTheatresSVC(oTheatres,OnSuccessTheatres,OnError,OnTimeOut); } function OnSuccessTheatres(result1) { Services.AdminWebServices.AddTicketPricesSVC(oTicketPrices,OnSuccessTicketPrices,OnError,OnTimeOut); //working } function OnSuccessTicketPrices(result2) { alert(result2); //...

MinusMOR type plugin with clean base?

I have read about MinusMOR but it seems not really being active supported. I love this idea- is there a better supported plugin for this purpose? ...

How to pass arguments to addEventListener listener function?

The situation is somewhat like- var someVar; someVar = some_other_function(); someObj.addEventListener("click", function(){ some_function(someVar); }, false); The problem is that the value of someVar is not visible inside the listener...

Is there a resource to help convert Prototype JavaScript to jQuery?

I have extensively used Prototype before and it helped us add considerable interactivity to our web applications. However we are looking at making the move to use jQuery in order to standardize on something better supported in Visual Studio. I understand that we can use the jQuery.noConflict to run it alongside Prototype, but we would l...

How is "20" and 20 considered equal in JavaScript?

I understand that using the "===" compares type, so running the following code results in "not equal" because it's comparing a number type to a string type. var a = 20; var b = "20"; if (a === b) { alert("They are equal"); } else { alert("They are not equal"); } But I dont understand how using the "==" to compa...

Javascript not running on IE

I Got a javascript that runs very well on firefox and safari, but refuses to run on IE It's the following: var drop= function(id) { if(document.getElementById("select1").value == "Ficha de pediatria"){ top.location.href = "print.jsp?id="+id+"&type=2"; } else if(document.getElementById("select1").value == "Ficha normal"){ ...

Generic way to fill out a form in javascript

I'm looking for a really generic way to "fill out" a form based on a parameter string using javascript. for example, if i have this form: <form id="someform"> <select name="option1"> <option value="1">1</option> <option value="2">2</option> </select> <select name="option2"> <option value="1">1</option> <option val...

Custom Virtual Earth Clustering

I want to implement my own clustering algorithm using this Virtual Earth javascript API: http://msdn.microsoft.com/en-us/library/cc966716.aspx However, the VE engine calls my cluster function once for every shape in the layer. This makes it very slow! It seems to me that VE should put all the shapes into a layer, then ask my function to...

Script Debugging Not Working (VS 2008)

I recently installed VS 6.0 after installing VS 2008 and overwrite JIT settings .. when i started VS 2008 option dialog .. it said another debugger has taken over VS 2008 debugger and I asked me to reset .. so I did .. Now everything works fine except javascript debugging. I am unable to debug javascript .. I can set breakpoint .. but i...