Is there a way to dynamically set the addthis:url attribute after page load?
I am not having any success with this and am curiuos if anyone else has done it.
Specifically, I have a page of images in a gallery that the user scrolls through and I'd like the addthis:url to point to whatever image is currently being viewed. My current (ugl...
I have a snippet to create a 'Like' button for our news site:
<iframe id="likeButton" src="http://www.facebook.com/widgets/like.php?href="
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px"></iframe>
However, to make it work properly, because the button posted an error saying the button was on...
function runProcess(){
var todo = items.concat();
setTimeout(function(){
process(todo.shift());
if(todo.length > 0){
setTimeout(arguments.callee, 25);
} else {
callback(items);
}
}, 25);
}
I tried to refactor this block into a function
function doWork(todo){
...
I get this response from an Ajax request.
Javascript seems to intepret it as a string.
(When I say alert this.responseText, the whole string is shown)
How can i convert it to a javascript object (JSON)?
{"response": {
"success": "The activity has been removed",
"message": "0"
}
}
I am not using jquery.
...
I've searched the farthest reaches of the internet, but I cannot find an online API for SharePoint 2010's JavaScript based Client Object Model.
...
I use geo.js in my webapp to let user share their location. In most browsers it works fine, however in Safari it usually hangs up. I know there's timeout in HTML5 geolocation, is there such thing in geo.js too?
Thanks!
...
Hello all,
I've got a facebook like button ( iFrame edition ) that is overlaid on top of a full browser Flash application. The like button is hooked up to like separate images within the application, and when each new images is shown, the like button is refreshed with data using ExternalInterface.
The like button fades in and out for e...
I want to set cookies using javascript that should not expire for some time. I create the cookie using the code below. These cookies are available in firefox across browser session (browser restarts). However, all cookies seem to get lost in IE. I want to set the cookie using javascript only.
I alerted document.cookie on page load. In a...
I am trying to implement the autocomplete method for textboxes.
I would like to use the example based on jquerys autocomplete provided here
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/j...
I'm trying to set few filters to search with this:
$.jgrid = {
search : {
caption: "Search...",
Find: "Find",
Reset: "Reset",
odata : ['equal', 'not equal'],
groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ],
matchText: " match",
rulesText: " rules"
}};
But I cannot get it to work. It is still listin...
I'm trying to implement comet in my application and, being inexperienced with JavaScript, I'm not sure how to do the client side.
When the server receives a request, it just keeps it open and writes data to it when necessary:
def render_GET(self, request):
print "connected"
request.write("Initiated\r\n")
reactor.callLater(r...
I have an element of an arbitrary type. I'd like to create another element, of either the same or a different type that has the same position and size as the first. The element may or may not be positioned.
For example, I might start with a <select> with a certain size, possibly dependent on its contents, i.e. width/height auto. I wa...
when mouseover .down, the div layer slides down
when mouseover .up, the div layer slides up
If the mouse goes over .b, how do I get the div to slide down without having to wait for the div layer to slide up first? basically kill the previous function immediately
<a href="#" class="down">Slide Down</a>
<a href="#" class="up">Slide Up<...
I think it's fairly clear what I want to do here:
var viewnames = {};
viewnames['region-a'] = "Region A";
viewnames['region-b'] = "Region B, partial";
viewnames['region-c'] = "Region C";
function loadView(view_name) {
alert('view_name: ' + view_name);
alert('viewname: ' + viewnames.view_name);
document.getElementById("viewt...
How can i possible not to show the year entry on jquery Ui datepicker. now its show as Oct 2010, but i just need Oct.
is it possible??
...
ok, this is simple, but I kinda need a noob's help.
I'd like to do something simple:
To assign an HTML file contents to a JS var, and then to pass this html code into a page element using the innerHTML property.
This can be done easily with HtmlHTTPRequest, however, i'm not sure what is the exact code i should use.
here's what I'd lik...
Possible Duplicate:
Location of parenthesis for auto-executing anonymous JavaScript functions?
Question is a duplicate of
http://stackoverflow.com/questions/3384504/location-of-parenthesis-for-auto-executing-anonymous-javascript-functions
and
http://stackoverflow.com/questions/440739/what-do-parentheses-surrounding-a-javascr...
I'd like Textmate to highlight Ruby syntax inside <% %> tags in *.js.erb files (like it does in *.html.erb files). Right now it looks like this:
As you can see, everything within the quotes is treated like a regular JS string – annoying.
...
How to Detect IE7/IE8 "run as administrator" mode with Javascript? I have a html page that needs to be run in administrator mode.
I can detect if it is ie8/7 and when that occurs I pop-up an alert saying the user must be in administrator mode for the page to work (because it runs an active-x that doesn't work other wise). That, howeve...
i have this jquery problems i have had for days, im so new to this, so excuse my dumbness in this subject. thanks :))
html code:
<ul class="statuses">
<li id="set_23" class="message">
// this is meant to increase everytime you click the vote_up just like stackoverflow
<span class="vote_count">27</span>
<a href="#" class="vote_up...