Sorry. I don't know a good title for this, but please look here:
http://joshblog.net/projects/logic-gate-simulator/Logicly.html
I saw this from delicious over the weekend. It is in flash and I wondered if something like this, as far as the graphics and interaction goes, could be done in javascript (jquery or other library, not roll...
In a web app I'm working on, I'm capturing onBeforeUnload to ask the user whether he really wants to exit.
Now, if he decides to stay, there are a number of things I'd like to do.
What I'm trying to figure out is that he actually chose to stay.
I can of course declare a SetTimeout for "x" seconds, and if that fires, then it would mean ...
I need to delete the latest browser history entry for this reason, but any other functions exposed by JS that manipulate (add/remove) history entries for the current page/tab, are also welcome.
...
In IE, you can onreadystatechange. There's onload, but I read scary things. jQuery wraps up the DOM's load event quite nicely with "ready". It seems likely I am just ignorant of another nice library's implementation of image loading.
The context is that I am generating images dynamically (via server callbacks) that can take some time d...
I have a login form which appears at the top of all of my pages when the user is logged out. My current jQuery/javascript code works in Firefox 3 but not IE 7. The code queries a page which simply returns the string "true" or "false" depending on whether the login was successful or not. Inside my $.ready() function call I have the fol...
I'm looking to replicate the image zooming on this site:
http://www.endless.com/adidas-Originals-adiracer-Trefoil-Sneaker/dp/B001I44OIG/183-5587133-4823042?ie=UTF8&cAsin=B001I44O2W&qid=1241466506612&asinTitle=adidas%20Originals%20adiracer%20Trefoil%20HG%20Sneaker&ref_=sw_1&asins=B001I44O2W%2CB001I457WS%2CB001LDJ2MM%2C...
I have recently been building a website that utilizes the .NET Framework 3.5 SP1 and the AJAX Control Toolkit. The standard AJAX controls such as UpdatePanel work without problem. As soon as I add a CollapsiblePanelExtender control from the AJAXControlToolkit to the page I receive a Javascript error. (NOTE: this problem occurs on Firef...
If I'm not completely wrong every framework/library/approach in javascript tends today to mimick class based OOP style inheritance. Reasons for this seem to be people thinking class based OOP inheritance is far easier to understand and that most programmers know OOP.
In my experience I don't find evidence for either of this opinions. I...
EDIT: the script mentioned in the question, and the other script pointed among the answers, both work just fine with multibyte strings - turned out my problem was elsewhere.
Does anyone know of such implementation? The script at http://phpjs.org/functions/view/469 works well, just not on multibyte strings.
...
I'm looking for a way to have an interactive JIT debugger, preferably integrated with Firebug.
I got the idea from PHPEd, which has an "Immediate" debug tab where you can just type in PHP code and modify objects on the fly. This makes debugging a breeze as you can re-assign variables multiple times, re-execute functions, etc without lea...
Are there any scripts and/or online tools that can reverse the effects of minification similar to how Tidy can clean up horrific HTML?
I'm specifically looking to unminify a minified JavaScript file, so variable renaming (like with compression or packing) should theoretically not be an issue.
...
I am trying to generate a URL that contains a UNC path as one of the query string variables. The URL will open in a pop up window when an ASP.NET button control is clicked by the user. When the clicks the button, the backwards slashes are removed from the UNC path causing the page to break.
The button renders correctly in the page sou...
In my project I need to write small WYSIWYG editor (just let users make text bold/italic/underline and maybe some more). So I wouldn't like to use monsters like tinymce or fckeditor. My question is what HTML elements and javascript functions do I need to know for it? An HTML element in which I can edit and format text is a very interesti...
I'm trying to set the focus on a text input element using
document.getElementById( 'id' ).focus()
This works in Firefox 3, but does not work in Internet Explorer 8.
What is the correct way to set focus on an HTML element in Internet Explorer?
...
Is there an easy way to take a string of html in JavaScript and strip out the html?
...
I've been investigating this issue that only seems to get worse the more I dig deeper.
I started innocently enough trying to use this expression to split a string on HTML 'br' tags:
T = captions.innerHTML.split(/<br.*?>/g);
This works in every browser (FF, Safari, Chrome), except IE7 and IE8 with example input text like this:
is inv...
I am generating a XMl document via JavaScript and need to prompt the user to save it to their local machine.
This is the code I have at the moment:
var xmlWindow = window.open("", "");
xmlWindow.document.write("<node>data</node>");
This writes the xml to a new window which the user can then hit file->save to download.
Is there an...
Hi,
I'm using the $(window).scroll(); to specify a function to be call for when the user scrolls too close to the top or bottom.
The function takes a second to execute, and if they continue scrolling, it executes multiple times before the first one has even finished.
Is there any way I can let the function start executing and then te...
Why do many professional web developers always insist on developing sites that accommodate for browsers that have Javascript disabled?
Who uses browsers older than Firefox 2 or IE6?
And besides tech heads and developers, who really has Javascript turned off anyway? Is it worth worrying about a small percentage of people?
...
Does anyone know how can I cut a string and then assign into an array with javascript? Example:
var string = "15;24;67;34;56";
I hope tp cut this string into below format and assign into the array:
a[0] = 15
a[1] = 24
a[2] = 67
a[3] = 34
a[3] = 56
...