Hi!
I'm trying to make a simple drawing tool using JS and Canvas element. My problem is that I would like to have several canvases and user should be able to draw one line through all of them. Here's a little page I did:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/...
I have two different applications loaded into different frames.
I need them to communicate
I know that javascript security model does not allow frames loaded from different domains to communicate
but since I control both applications maybe there is a way to allow frames loaded from specific another domain to communicate with this frame
...
I have a javascript object in a dictionary that looks like this:
{ date: "2010/01",
San_Francisco201001: 1,
San_Francisco201002: 2,
San_Francisco201003: 3,
},
{ date: "2010/02",
San_Francisco201001: 0,
San_Francisco201002: 1,
San_Francisco201003: 2,
}
And would like to find
{ date: "2010/01", sum: 6, ), { date: "2010/02", sum: 3, )
...
Looking at improving the performance of my jquery selectors. so any tips or articles as the best per formant jquery selectors? For example selecting the a div's id. Anywhere online I can provide html and compare the different selectors I can use to select the required element.
...
Hi all, this is the weirdest thing. My code is below:
function menuSwipe(init){
dojo.query('div.fill div.container div.menu div.group ul').forEach(function(item){
dojo.fx.wipeOut({
node: item,
duration: 1
}).play();
dojo.query('li', item).forEach(function(childrenItem){
if ...
Check this link.
http://dev.twitter.com/pages/share_bookmarklet
Drag bookmarklet to your bookmark-bar and click on it. It will open a pop up window.
Why is my firefox/ie/chrome not blocking this?
Thanks
javascript:
function loadScript(scriptURL) {
var scriptElem = document.createElement('SCRIPT');
scriptElem.setAttribute('la...
I am working on integrating a javascript shopping cart, simplecart-js, into a Jquery LightBox, Yoxview. Yoxview has an option to add button links in the popup title pane for various options, downloading, shopping cart, etc. The relevant code for my shopping cart button is:
var yoxviewCartButton = $("<a>", {
title: "Add to cart",
});...
hi,
need Javascript equiv of php strtotime()..
thanks in advance...
...
I'm working on a really simple cellular automata program in JavaScript. For right now I just want to write a bunch of random Boolean values to a two-dimensional array and then read that array back to be manipulated or displayed in some way.
var dimension = 5;
var grid = new Array();
for (x = 0; x < dimension; x++) {
grid[x...
Hi, basically i have a page on my site with boxes that slide to reveal a background color. I want this background color to be random on load of page by adding a class to the element, eg .blue, .green etc...
I have created this code and as you may notice this randomly sorts the color class and applies to the element, this works for the f...
I want to overload the conversion of an object to a string, so that the following example would output the string "TEST" instead of "[object Object]". How do I do this?
function TestObj()
{
this.sValue = "TEST";
}
function Test()
{
var x = new TestObj();
document.write(x);
}
...
hi, how do you call php function that is in a different file from a javascript function.
I have a javascript function that recieves a variable frm an onclick function. The varaible is an id that I will use to retrieve data from mysql database. The variable is then pass on to php function that will access the database to get the data an...
This is a very narrow scope of the code, but it is where the issue lies.
function getJSON(tabUrl){
$.getJSON(tabUrl, function(data){
console.log(data);
});
}
I am using jquery 1.3 because getJSON in 1.3 can handle malformed JSON. The server I'm getting my json from uses the old parameter:'value' format.
Here is the perplexin...
my onchange isn't firing the javascript method properly.
Select code (in HTML file)
<select id="crit_1" onchange="crit1Update()">
<option value=null>Criteria 1</option>
<option value="major">Major</option>
<option value="grad">Graduation Year</option>
</select>
crit1Update() code (in external filter.js file in same folder as HT...
I have a javascript script in a chrome extension i'm building. It is content script.
The script is using mediawiki api:
function wikifind(str)
{
var req = new XMLHttpRequest();
url = "http://en.wikipedia.org/w/api.php?action=query&format=xml&titles="+str;
req.open("GET", url, true);
req.send;
}
I have two ...
I'm using HAML to make html templates but am having a problem in writing attributes which will be replaced with JavaScript string templating.
The line in question looks like this:
%div{:class => "<%= from_class %>"}
HAML tries to encode the <%= %> tags:
<div class="<%= from_class %>">
I don't want that to happen in this cas...
How to add pause button in this jQuery image slider? I want to add Pause on click button at last after 4 ?
Like this: see example pic http://shup.com/Shup/431390/110929231254-My-Desktop.png
http://www.sohtanaka.com/web-design/examples/image-slider/
I want add another link button to pause the slider on current slide. and it should no...
I've implemented the notification alert in an iphone project using phonegap. I've tried the direct, quick, and full examples listed on their api page: http://docs.phonegap.com/phonegap_notification_notification.md.html
The problem is that when the event fires, it fires multiple times. Twice on iphone 3gs, and 3 times on iphone 3g. I'...
How would I get access to the a_var that is in setTimeout, from the outter someFunction?
Thanks.
function someFunction(){
(function why(){
setTimeout(function(){
var a_var='help I wanna get out!';
return a_var;//<-useless?
},...
just a really random question but is the property Math.PI in javascript always 3.141592653589793 in every browser/engine?
...