Articles for JavaScript
-
Call multiple ajax calls in sequence, rather than all at the same time
0 comments Read More -
Make Select2 Dropbox to work like an autocomplete
0 commentsLoad data based on what you type instead of loading all of it together
Read More -
XWord
0 commentsRead More
-
Missile JS example
0 commentsRead More
-
Compare two lists for 'same' content
0 comments Read More -
Simple one page spider
0 comments Read More -
Ascii art - excel to source code table
0 commentsIf you want to paste an example from excel into your source code - use this
Read More -
Paste multiple lines with crlf into a single cell, and prevent enter in child forms
0 comments Read More -
javascript animation
0 comments Read More -
jDrop file uploader
0 commentsjDrop is a jQuery extension for uploading files. It is fully customizable and can be configured to work with any web site. It features Progress Bar and Drag & Drop if the browser supports them. It works by extending an existing control, and specifying user elements. It will detect if your browser and is compatible with HTML5, it falls back to implementing an iFrame for older browsers, so that there are no post backs required. It supports FireFox, Chrome, Safari, Opera, and Internet Explorer 6 +.
Read More -
How to write an mvc view to a string
4 commentsuseful when returning ajax
Read More -
How to do cool radio buttons or select buttons
1 commentsfrom twitch
Read More -
Infinite scroll
2 commentsHow to do an infinite scroll.
Read More -
How to use jsonp and mvc to cross domains when we control both domains
1 commentsSometimes you need to call ajax on a different server. Thies is how to use jsonp and mvc to cross domains when we control both domains
Read More -
Cool plugins for jquery
0 commentsfrom the maker of colorbox
Read More -
Colourbox and forms
9 commentsProblems when forms disappear from colorbox (colorpowered)
Read More -
How to convert a DataSet to JSON for return via ajax
0 commentsHow to convert a DataSet to JSON for return via ajax - without any library dependencies
Read More -
Mobile Websites
0 commentsCubiq.org Matteo Spinelli has got lots of mobile optimised javascript demos and libraries. http://cubiq.org/category/projects SwipeView - Provides swipe enabled slideshow with hardware accelerated animation iScroll - Proper scrolling DIVs on mobile Add to Home Screen Slide in Menu - a really nice ...
Read More -
How to resize an iframe from within the iframe - using postMessage for communication
9 comments Read More -
JS Date calcs
0 comments Read More -
Mobile frameworks
3 commentsRead More
-
Javascript Fullscreen mode
0 commentsrflow.com/questions/1125084/how-to-make-in-javascript-full-screen-windows-stretching-all-over-the-screen">http://stackoverflow.com/questions/1125084/how-to-make-in-javascript-full-screen-windows-stretching-all-over-the-screen function cancelFullScreen(el) { var requestMethod = el.cancelFu...
Read More -
jQuery
2 commentsHow to make some options in a dropbox grey This makes all options which contain the word 'discontinued' grey. function GreyOutInactiveProducts() { jQuery(".ProductSelector option:contains('discontinued')").css("color", "#666") } jQuery(document).ready(GreyOutInactiveProducts) How to use JS...
Read More -
jQuery UI Autocomplete
0 commentsThere are 2 versions of jquery autocomplete - the old and the new. Both written by same dude, Jörn Zaefferer who also wrote Validation plugin. New Version Works with JSON data source (very tricky to do plain text - see here) Compatible with jquery 1.4 Part of jQuery UI 1.8 All methods pretty much...
Read More -
Compare technologies
3 commentshttp://socialcompare.com/en/search?q=javascript&l=on&c=on Sliders http://socialcompare.com/en/comparison/javascript-slideshows-carousel-sliders-jzoekfm Charts http://socialcompare.com/en/comparison/javascript-graphs-and-charts-libraries
Read More -
Flash IE8 Javascript Error
0 commentsFlash generates a bunch of js code for communication with javascript. This can easily break in old versions of IE. Here is some of the Flash generated code: function __flash__addCallback(instance, name) { instance[name] = function () { return eval(instance.CallFunction("<invoke name=\""+n...
Read More -
Position and Move in Jquery
2 commentsIf you have a page with a space in it, and you want to move a div into that space that is tacked onto the end of the page, you could do this. <script type="text/javascript"> $(document).ready(function () { var formTop = $('#chimpform').position().top var formTopPosn = $('#chimpformPosn')....
Read More -
JQuery Validation and HTML 5
0 commentsAs Html 5 comes online more some of the older jquery valiation may not appear to work (first noticed in chrome). This is because HTML5 validation overrides JQuery Validation. To fix this add the following tag in the $(document).ready function to disable the default HTML5 validate.. $("#form").att...
Read More -
Protect content on a page from copy
0 commentsUsing jquery, add this code (unless site is in dev mode) <%if(!Util.ServerIsDev){%> //prevent copy/paste $('body').bind('copy', function (e) { alert('Sorry, copy not allowed. Please note that Paste is allowed.') e.preventDefault(); }); <%} %> It's a fairly simple way to prevent pe...
Read More -
Jquery Client Side JS Validation examples
5 commentsHow to put in a custom validator with jQuery validate For my current project I needed a custom validator method for the jQuery validator plug-in. I wanted to validate that a user has chosen a value from a combo box where the value is of type Guid. First I implemented a JavaScript function which tes...
Read More -
jQuery Event Handling
0 commentsCloning elements and Binding and Rebinding events Use .clone(true) to copy event handlers as well. This article describes in more detail and also talks about rebinding and unbinding events manually when doing DOM manipulation other than cloning. http://www.learningjquery.com/2008/05/working-with-ev...
Read More -
JQuery UI
0 commentsIssues with jquery ui datepicker in Chrome answer from http://forum.jquery.com/topic/jqueryui-datepicker-and-google-chrome Here is the scenario: The page contains a form, with a dropdown box, a date field (with JQueryUI Datepicker) and a submit button. When I click on the submit button in C...
Read More -
jQuery Validation
6 commentsEmulate ASP.NET validation groups with jQuery validation http://encosia.com/2009/11/24/asp-net-webforms-validation-groups-with-jquery-validation/ In my most recent post, I demonstrated a workaround to allow using the jQuery validation plugin with WebForms pages. The basic idea was to trigger vali...
Read More -
Change the source (src) of a flash movie without page reload
2 commentsHow to Change the source (src) of a flash movie without page reload function ChangeSwf(movieSwf) { var NewSwf = "img/"+movieSwf; if(document.all) { flashbg.LoadMovie(0, NewSwf); } else { document.embeds['flashbg'].LoadMovie(0, NewSwf); } } add this to the obj/embed <PARAM name="s...
Read More