I'm looking for a pre-made content/text filter plugin that checks (as the user types in a textbox) the typed words against a list of inappropriate words. I then want to provide some sort of alert box or flag notifying the user that this language is unacceptable...
Again, I'm looking for the easy-way-out, an existing content filter pl...
I am using the JSONP/dynamic-script-tag technique to perform cross-domain AJAX (There's no XML, but you know what I mean).
Initially, I wrote my own solution, but I could not come up with an elegant way to remove the script after it executed. My strategy was just to pass an ID and on the callback remove the associated script, but I real...
So, let's say I have this in the file http://site1.com/index.html:
<script src=http://site2.com/myscript.js></script>
Inside "myscript.js", I need to get access to the URL "http://site2.com/myscript.js". I'd like to have something like this:
function getScriptURL() {
// something here
return s
}
alert(getScriptURL(...
I'm trying to use jstestdriver to generate some unit tests in my ant build in Windows. I plan to do this by running jstestdriver from an ant target using the <java> ant task.
So far for my ant build file I have the following:
<target name="jstestdriver" description="Runs the js unit tests">
...
Now inside the <j...
I'm new to Sprys and am inserting a horizontal menu Spry into a webpage using Dreamweaver. The problem is that it is contains a LOT of information.
How can I get my horizontal Spry to expand like:
ITEM_1 ITEM_2 ITEM_3 ITEM_4
ITEM_1A ITEM_1B ITEM_1C
rather than:
ITEM_1 ITEM_2 ITEM_3 ITEM_4
ITEM_1A
ITEM_1B
ITEM_1C
...
We are working on a JavaScript application that does has been crashing for no reason that we can see. The nature of the application is that it uses javascript to redirect the page every few seconds. and rotates through a number of web pages in a set ammount of time.
So in searching for a potential memory leak in our code we set it up t...
Basically, how does this work: http://www.stream-hub.com/demo/RealTimeChart/index.html
They are streaming JS through an iframe continuously and the browser window does NOT show the page as "loading". How did they do that? The streaming part is easy, but how do they prevent the browser window from being in a continuous "loading" state?
...
Hi,
In <insert non-IE browser here> there is the <canvas> element that allows for doing some fairly advanced drawing. In IE it's possible to draw with <div> elements, but that can get pretty slow if you're doing anything more than a few basic tasks.
Is there anything available in IE 5+, in pure HTML/CSS/Javascript, that can allows for ...
In HTML5, the search input type appears with a little X on the right that will clear the textbox (at least in Chrome, maybe others). Is there a way to detect when this X is clicked in javascript or jQuery other than, say, detecting when the box is clicked at all or doing some sort of location click-detecting (x-position/y-position)?
Tha...
What is the point of returning methods in the following example when you can accomplish the same thing by just declaring the NS straightforward in the second code snippet?
1:
var NS = function() {
return {
method_1 : function() {
// do stuff here
},
method_2 : function() {
// do stuff...
I'm trying to clone a table row and update the multiple id's to reflect the input fields. I start by doing this and it works:
$(id).clone().attr("id", "newId");
That changes the id of my main table row to the new id. In the table row I have other id's that need to be changed. For example:
<input type="text" id="input_1">
Will be ch...
What's the best way to send a large data set via a GET request.
I cannot use POST because of some design limitations.
I can use jQuery or any other library, sizzle is preferable.
I have a complex data set that has nestings within it, and json fits the bill well.
Thanks for your help.
...
<script>
$(function(){
$("a.a, a.b, a.c, a.d").click(function () {
alert('Hi');
});
});
</script>
<a href="#" class="a button">Hi</a>
The above JQuery unfortunately doesn't work. Probably an easy fix, any ideas? I need it to be a multi-selector, but with a's that have multiple classes unfor...
This happens in Firefox, but not in Google Chrome.
I create an SVG 'Image' tag in an svg-web canvas like this:
im = document.createElementNS(svgns, 'image');
im.setAttributeNS(xlinkns, 'href', g.href);
canvas.appendChild(im);
And if I look in firebug or chrome's debugger, the svg shows up self-closed like this:
<image xlink:href=".....
Looking for a fuel gauge in JavaScript (no flash please).
I founf this site, anyone try it?
FREE - Bindows™ Ajax Gauges Library
Any other recommendations?
Thank You,
Greg
...
Here is my code:
dojo.provide("test.validation");
dojo.declare("test.validation", null, {
addValidate : function(a) {
this.a = dijit.byId(a);
var link = dojo.connect(dijit.byId("form"), "onclick", this.validate);
},
validate : function(e) {
e.preventDefault();
console.log(this);
if (...
Here's an interesting JS q... suppose you have:
host1.html on host1.com which references an external javascript (host2.js) on host2.com. In the host2.js, I'd like to get the location.hostname of the host serving the host2.js, but because host2.js is called inside of host1.html, it returns the location.hostname of host1.
Is there a way...
I'd like for the page to open at a certain div halfway down the page, not at the top...
I have something like:
<div id="d1">
<div id="d2">
<div id="d3">
<div id="d4">
<div id="d5">
<div id="d6">
How can I get the page to open at #d4, instead of the top? (Besides adding #d4 to the end to the URL...)
I imagine there must be some easy...
Is this:
<h1 id="superheader">Morbi in sem quis</h1>
<ul class="highlight">
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
<li>Aliquam tincidunt mauris eu risus.</li>
<li class="important">Vestibulum auctor dapibus neque.</li>
</ul>
<p id="fancy"><a href="#" onclick="javascript:theFunc();">Vestibulum tortor quam</a>....
I have a click function bound to many elements. It is possible that sometimes these elements may sit within one another. So, the click event is bound to a child and also bound to its parent. The method is specific to the element clicked. Naturally, because of event bubbling, the child's event is fired first, and then the parents. I ca...