Hi all,
I am developing a small facebook application.
In my application I need offline_access and email permission. I've been succesfully prompting the user for permission using
FB.Connect.showPermissionDialog("email,offline_access");
But what I really want to do is prompt the user with a require permission dialog, not request.
Doe...
In a simple html page I have:
<SCRIPT>
function Clicker(number){
if (number == 1)
document.write ('<style type="text/css">body {background-color: #cccccc;}</style>');
}
</SCRIPT>
and in the html body:
<a onmouseclick="Clicker(1)" href="#">clic</a>
But when I click on the link nothing happens. Where am I wrong?
...
I am learning jQuery and trying the following but the parameters are so foreign to me with all the embedded quotes I think that is my problem. Can someone explain the parameters and where quotes go and possibly rewrite my parameters line? (This is a live site to see the required parms).
function AirportInfo() {
var divToBeWorkedOn = '...
Hi,
Say, I have an array that looks like this:
var playlist = [
{artist:"Herbie Hancock", title:"Thrust"},
{artist:"Lalo Schifrin", title:"Shifting Gears"},
{artist:"Faze-O", title:"Riding High"}
];
How can move an element to another position?
I want to move for example, {artist:"Lalo Schifrin", title:"Shifting Gears"} t...
I wrote a userscript to highlight the current row in GMail (indicated by the arrow). Unfortunately the highlight will only stay until GMail Inbox is auto-refreshed, which happens quite often. Is there a way to catch that event so I could reapply the highlighting? I don't want to do it on timeout. There is another userscript that does tha...
Hi,
I have a simple code fragment in JS working with prototype inheritance.
function object(o) {
function F() {}
F.prototype = o;
return new F();
}
//the following code block has a alternate version
var mammal = {
color: "brown",
getColor: function() {
return this.color;
}
}
var myCat = object(mammal)...
I'm doing a Pyjamas example and get this error:
TodoApp InternalError: too much recursion
Here is the significant portion of TodoApp.py from the linked tutorial (please ignore indentation from the copy/paste):
class TodoApp:
def onModuleLoad(self):
self.remote = DataService()
panel = VerticalPanel()
self.todoTextBox = T...
Hey there.
I'm trying to locate a city latitude and longitude only by having it's name.
I'm trying to use only the Gmaps API and avoiding the use of the webservice that google offers for geolocation.
...
i want to create a new '.b' div appendTo document.body,
and it can dragable like its father,
but i can not clone the drag event,
how to do this,
thanks
this is my code :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="viewport" co...
In Douglas Crockford's JavaScript: The Good Parts he recommends that we use functional inheritance. Here's an example:
var mammal = function(spec, my) {
var that = {};
my = my || {};
// Protected
my.clearThroat = function() {
return "Ahem";
};
that.getName = function() {
return spec.name;
...
I have a swf hosted at domain A, and I have a html at domain B
My swf is able to be loaded from accessing the html at domain B.
However, the swf gets a
SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller http://domainA.com/TrialApp.swf cannot access http://DomainB.com/.
The as3 is just the below:
External...
Here is my code:
var showNo = 1;
window.setInterval(function() {
console.log(showNo);
if(showNo === 1) { var nextNo = 2; }
else if(showNo === 2) { var nextNo = 3; }
else if(showNo === 3) { var nextNo = 4; }
else if(showNo === 4) { var nextNo = 5; }
else if(show...
I am designing a website that plays music. I need a flash player that has or can handle a now playing list. The problem I am facing is that I cannot update the playlist without refreshing the player which means it will interrupt the song that is currently playing. I have trying with JW player in particular so far and have not been succes...
Is is possible to insert value in an input element of a html form if the element is of type "file"? How to do so, if it is possible?
...
cauz i have to use a normal dom-element ,
the dom-element is like this : document.getElementById('a') or document.createElement('div')
so my mean is change $('#a') to document.getElementById('a')
can jquery do this ??
thanks
...
this is my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="viewport" content="width=device-width, user-scalable=no">
</head>
<body>
<style type="text/css" media="screen">
</style>
<!--<div id="m...
Hello there, I'm having a bit of a problem because neither Javascript nor ActiveX (written in C++) are behaving like good little children. All I'm asking them to do is for Javascript to send a byte array and for the ActiveX to receive the byte array correctly in order to do more computation.
This is how I declared my byte array in JS, a...
Hello.
I am writing for my desktop some application for handling some services.
I wrote in C# an application that calculates something (lets call it cl.exe)
I created a .bat file that starts the cl.exe.
I want to call that .bat file from my javascript so I WShell.Run(**.bat).
2 question:
The javascript program will not
continue till...
I need a function to change the appearance of some elements in my html page "on the fly", but I am not able to do.
The problem is that I cannot use a command like
document.write ('body {background-color: #cccccc;}');
because I need to make the changes effective when the page is already loaded, using a link like
<a onmouseclick="Cl...
My textarea is behaving very strange, when I click inside it .. the cursor appears there when I click, if I click on the middle of the textarea it appears there, and I'd like it to appear on the beginning wherever I click inside, like here on SO when asking question, wherever you click inside textarea it takes your cursor to the topmost ...