javascript

Can we find out if skype is installed or not on a machine thoough web app?

Hi, I am writing some web app, from web app I want to know if skype is installed or not on a machine from which web page is called. Is this possible? if yes how? It should work at least on Firefox, IE and chrome on windows. If it works on Linux and Mac then it will be great. Thanks in advance. ...

What is the difference between "marker.setVisible(false)" and "marker.setMap(null)" in Google Maps v3?

I want to clear marker on Google Maps. What is the difference between marker.setVisible(false) and marker.setMap(null)? But i don't know which is right? Thanks ...

How to prevent this code from affecting img onclick?

$(document).ready(function(){ $("a[href*='http://']:not([href*='"+location.hostname+"'])").attr("target","_blank"); $("a[target!='_blank'][target!='_top']").live('click', function(){ $("#actualcontent").html('<center><img src="/deltasite/uploads/smallloader.gif"></center>'); var url=$(this).attr("href")+'?jquery=1'; $("#actualconten...

Stacked Anchors

I have three stacked images that I rotate through using Dojo fadeIn and fadeOut and a timer. Only the href for the last one is ever available. Is it possible to rotate the href as well? <div id="main-slideshow"> <a href="catalog_item.php?sku=1001"><img src="images/catalog/WRP21Aug10_0014.jpg" /></a> <a href="catalog_item.php?sku=1002">...

using autosuggest to fill in an input text field after user enters their input, using jquery.

I am trying to use the autosuggest plugin of jquery to take a users input, jquery that input to a php mysql script to get information, then replace the users input with what was retrieved from the jquery request. Now this should stump you all for a minute. first off...if I replace the returned text from the autosuggest script with jus...

Escaping Apostrophes in Javascript Generated From PHP

I am trying to have a textfield with an initial value, where if you click on it, the text disappears, and if you click out before anything has been entered the initial value returns much like the search box on Yahoo answers and many other sites. echo "<input type=\"text\" onblur=\"if (this.value == '') {this.value = '$cleaned';}\" o...

jQuery get item parent

I am trying to get the parent item of an item with the below code. (the content of the parent) ex. the parent of "Item 1.1" would be "Item 2" in the below example. Items: <ul class="sortable" id="page-list"> <li><div>Item 1</div></li> <li><div>Item 2</div> <ul> <li>...

Listening for javascript touch events but still allowing default scrolling behaviour

I am trying to implement a scrollable element for a mobile app and it looks like you must use preventDefault on the initial touchStart event, otherwise the browser will not fire all the touchMove events (presumably for performance reasons). So it would seem that if I want to allow touch scrolling on an overflown element, the user will n...

Help with debugging JQuery Fade Script

For one of my first ventures into JQuery, I have the very simple goal of stepping through the children of a div and fading them in and out one by one. For some reason though, if I manually define an index for nth-child, say 1, then the first child fades in and out four times. If I use the variable "i", however, then all of the children...

Reinitialize Kalthura mwEmbed-player-static.js after AJAX content loads

We're using the mwEmbed-player-static.js library to handle playing video on a site. This works fine for a static page where we can load the script and that's it. But if we load the video tag as part of the dynamic content via AJAX, nothing happens. We need a way to reinitialize the player or reload the script. Has anyone dealt with this ...

Using the Popup Object

It seems like The popup object cannot have a textbox or any elements that can be selected inside it? Is there any other way on accomplishing this? ...

Is there a way track the focus on tab with Javascript?

We need to track the EFFECTIVE time on site of our users Most users, when they're done, leave the tab open and move to another tab Time on site it's extremely inaccurate Is there a Javascript Event to track the "loss of focus" of the current tab ? ...

Regular expression to find last word in sentence

how can i use regular expression to find a word that is the last word of a sentence? ...

setTimeout in loop to check for a change in bounds

This is my code: var b; while(!b){ setTimeout(function(){ alert('sss') b=1; }, 500); } and it will not alert 'sss' What can i do? Updated: I want to get bounds on google maps v3: function get_bounds(){ var bounds_; while(!bounds_){ setTimeout(function(){ ...

image-map associated with more than one image

Let's say there are several identical images on the page, all associated with the same map: <img id="img1" usemap="#my-map" .... > <img id="img2" usemap="#my-map" .... > <img id="img3" usemap="#my-map" .... > <map name="my-map"> <area .... coords=... class="foo"> <area .... coords=... class="bar"> </map> There is a mouseover ev...

How to detect if a request was aborted?

I am making a request and then right after it I abort. var x = $.get(url, function (d, e, xhr) { alert(d); }); x.abort(); The problem is that it executes the success function and returns empty data... (example here) Is there a jQuery method to abort? or Is there a way to check if the xhr was aborted? ...

blend two images on a javascript canvas

How do you blend two arrays of pixel data to create one image? with the option of using different blending modes? ...

why does jquery .text() always return an empty string?

I have a simple $.ajax call that returns a response that looks like this: <div id='type'>success</div> <div id="graph"></div> <script type='text/javascript'> //some script that manipulates the graph div </script> and on my .ajax's success(response) function, I have: $(response).find('#type').text() my problem is that it always r...

jQuery Store Values of checkboxes in div

How can I get this list of checkboxes to be added to a div prior to their selected state, so if they are selected, they should be added to the div, if not they are removed from the list if not selected. <div id="selected-people"></div> <input type="checkbox" value="45" id="Jamie" /> <input type="checkbox" value="46" id="Ethan" /> <inpu...

Javascript: Delaying display of the context menu (Chrome)

I'm trying to dynamically create context menu items in a Chrome extension; this involves sending a request to the main extension process to modify the menu, and blocking the menu from being displayed until a response is sent. I've been experimenting with different solutions all day, and I have yet to come up with one that works. For ex...