So there are these different open authentication schemes, such as OAuth, OpenID, and Facebook Connect among others. Are there any packages that provide a common interface for these various systems? It seems that it would be a boon to someone with a site to have a single interface layer for interoperating with these disparate sign-in syst...
I have a widget-like block of HTML+JavaScript that people can copy/paste into their HTML-page one or multiple times. That block checks if an external JavaScript file is already in the DOM, and loads it if not, something like this:
(function(){
d = document;
if (!d.getElementById('ex-scr')) {
scr = d.createElement('script');
...
I am have a problem with creating a server push network object. Because Firefox and chrome handle server push differently, (Firefox get onload events, chrome uses onprogress /broken ). For chrome I need to capture the onprogress events and then mask off the previous data from the responseText. I want to pass just the new data to chrome. ...
Possible Duplicate:
Generating random numbers in Javascript
How do I get a random number between −10 and 10 in JavaScript?
...
Hi!
I want to detect the language of the virtual keyboard of a user visiting my WebApp and set some stuff accordingly.
I have found an Objective-C solution, but I need it in JavaScript.
Thanks!
...
When my document loads, I'd like to have JavaScript reload my images' sources. To do so, I got the following code in my HTML document:
<img src="#" id="mypic" onload="reloadImage(this);"/>
and in my JavaScript document:
function reloadImage(imageElement) {
imageElement.src = "http://www.somedomain.com/image.png";
}
However, thi...
I am writing a code to post html-based blog posts through jquery/ajax to php to amazon s3.
I first urlencode the post with this function from php.js - http://phpjs.org/functions/urlencode:573 then send it to a php which stores the content as is to s3. If i read this file naked, it looks fine with slashed for special characters like " '...
I have a div with it's CSS style property set to overflow:scroll. This does show a vertical and horizontal scrollbar when the content is large. Now when I click on the scroll bar it is not actually scrolling the div content. Anything wrong , please advise.
...
I'm trying to understand how all these tools work since, as far as I know, they change the name of variables to achieve a better compression.
Do they also change the name of properties of objects? I guess they would not, since otherwise anything using the object[property] notation, where property is computed dynamically, could fail. Is ...
Is there a good way to .appendTo either one element or the either depending on if it exists in the DOM?
So for example ideally I would like to do
ideal method 1:
.appendTo($('#div1') || $('#div2'));
not so good method 2:
var div1 = $('#div1'),
div2 = $('#div2'),
e = div1;
if (!div1.length) e = div2;
.appendTo(e);
Of cou...
Is there anyway to make a jQuery UI Datepicker unclickable, so that it's essentially just displaying a date? I tried
$("#calendar").datepicker({
disabled: true,
altField: '#note_date',
maxDate: 0
});
but it didn't work. Thanks for reading.
...
I'm using a autosuggestion for adresses through google maps API that I want to be as fast as possible.
Currently, I have added a 10ms delay to my script in order to avoid being banned for to many requests, is this necessary. How many requests can be made without getting banned?
Ps, i'd love some appropriate tags for this, I really can'...
I have a simple image-looping script that changes the src of an image.
function cycleNext()
{
++imgIndex;
if(imgIndex>imgCount)
{
imgIndex = 1;
}
setImgSrc(imgIndex);
}
However, at present, I'm (shudder) manually entering imgCount in my script. The alternative is server-side, but I don't know how to fetch...
I did a quiz page for our computer project and I've recently finished it.I was happy to know that it was working well. The problem now is that it only works on Google Chrome but not on Firefox. When I open it in Google Chrome, everything works: prompts for a name, function for score, etc. But nothing works in Firefox. Need help please.
...
This is an often used HTML piece on websites.
<noscript>
Please enable JavaScript or use a JavaScript capable device to get the maximum benefit of this site.
</noscript>
I want to link it to some directions or similar to enable JavaScript. I don't want to make my own list, as it would require me to update it.
I have found the Google...
Chrome does not appear to give any indication that a page has JavaScript errors, unless you open up the JavaScript Console to check.
Is there any way to have an indication that there were errors, and then automatically open the JavaScript Console? Can the JavaScript console be opened from JavaScript?
...
Hello People
Would somebody please advise me as to what I'm doing wrong with this piece of code?
I am currently using a simple JSON file to provide data for info windows using the Google maps V3 API. I am aware of the concept of closures but cannot seem to understand why the info windows are still displaying the last result on click.
...
Hi,
I have an element, any element, upon when clicked, gives me e.pageX value of higher than it should be, by one pixel. For example, if I have a div like:
<div style="width: 129px; height: 129px;"></div>
and I click on it, according to the e.pageX the position was 130px, which can't be true since I clicked on the element. What's up ...
Hi,
I have a CSS button that has normal, pressed and hover states. Everything works fine except that when the click has happened, I need to somehow know whether the style should be set to normal or hover. That is, I need a way of knowing if the mouse cursor is still hovering the element. How would one achieve this with JavaScript?
...
Hey.
I'm trying to validate a datepicker in a form, but it only seems to work in Firefox 3.6. I can't see what i'm doing wrong, please lend me your wise eyes to check through my code.
Live Example: http://event.gusthlm.se/make.php Try picking any date ("Börjar" and "Slutar"), also try switching month with the datepicker up.
Validation...