I want to be able to select multiple check boxes onmouseover, but instead of applying onmouseover to every individual box, I've been trying to work out how to do so by manipulating check boxes by ID instead, although I'm not sure where to go from using getElementById,. So instead of what you see below.
<html>
<head>
<script>
var T...
I need to know if the user is currently viewing a tab or not in Google Chrome. I tried to use the events blur and focus binded to the window, but only the blur seems to be working correctly.
window.addEventListener('focus', function() {
document.title = 'focused';
});
window.addEventListener('blur', function() {
document.title = 'n...
When i click #tool I want to add the class .spanner to the div #drill.
However when #drill has the class .spanner and #tool is clicked i want the class to be removed?
...
I want to get the .next() and .prev() sibling of an HTML element without excluding TextNodes.
I basically need to understand if an element is directly sorrounded by <br> HTML elements.
This would return true:
<br>
<div></div>
<br>
This would return false:
<br>
Some text
<div></div>
<br>
BUT this needs to also return true:
<br>
...
Hi,
I have a menu in jQuery when you click on a link it opens up, but I want it so when you click somewhere else, anywhere else that is not the menu, it becomes hidden.
At the moment I'm binding a click event to
$(':not(#the_menu)')
But this seems like I'm binding a click event to the entire minus the menu, is there a more efficie...
I am trying to set focus to the text box on page load event. I tried many solutions by referring the element id, but couldn't able to focus the element. Later when I inspect the element using firebug I found for the same element the id changes in different execution. I am looking for the simplest solution using javascript or jquery to ac...
How can you represent mathematical constant "e" as a value in JavaScript?
...
Hi!
I'm doing client side validation on a project I'm working on. Everything works, except for the minimumlength property of the StringLength attribute (it works when submitting and a serverside validation is done):
[StringLength(50, MinimumLength = 6)]
The javascript generated by Html.EnableClientValication(); is the following:
// ...
The project is a servlet to which people can upload files via, at present, HTTP POST. This is accompanied by Web page(s) providing a front-end to trigger the upload. We have more or less complete control over the servlet, and the Web pages, but don't want to impose any restrictions on the client beyond being a reasonably modern browser w...
The scriptaculous shaking effect somehow produce some bugs for Webkit browsers, including Chrome and Safari. When shaking, the element will shift to the top left of the screen covering everything. An example code is given as below, are there any ways of solving this?
<html>
<head>
<script type='text/javascript' src='http://ajax.googleap...
How to create a list of checkbox and retrieve selected checkbox value in javascript
...
Hi,
how can I get the indentifier of an associative array (not Array object) in a for loop?
like so:
var i = 0;
for(i=0;i<=myArray;i++)
{
if(myArray.ident == 'title') alert('The title is ' + myArray['title']);
}
...
I'm writing quite a bit of code in Prototype.js which returns null if a DOM-id wasn't found.
$("someId").show();
If someId doesn't exist, a method will be called on null, which halts the entire program, in effect disabling all JS effects after the error. I could just check for null before executing such a statement, but this is getti...
Hi,
I'm trying to insert reCaptcha code into my page from jQuery, but it doesn't work.
Here is my code:
$("#button").click(function() {
$("#loginBox").html($.getRecaptcha());
})
When I try the following, my code doesn't even run. I think it's trying to execute instead of rendering it.
$.getRecaptcha = function(){
ret...
sliding div using javascript
i have three div with some content. i need the div to be moved one after another . moving div horizontally
any idea..
...
Problem 1
Error: Microsoft JScript runtime error: '$.fn' is null or not an object
Error area:
$.fn.apply=function(item,content,header){
$(".featureBox"+item).css('z-index', "1000");
$("img.featureBox" + item +"top").attr("src",basepath + "box-big-top.jpg");
$("img.featureBox" + item +"imgcut").attr("src",b...
Hi all;
Not Work
Jquery Code:
$('[id$=Name]').autocomplete('CallBack.aspx',{formatItem: function(item){return item.Name;}}).result(function(event, item) {
location.href = item.AGE;
});
Json:
var data = [{NAME:"John",AGE:"57"}];
Work
Jquery Code:
var data = [{NAME:"John",AGE:"57"}];
$('[id$=Name]').autoco...
I need to change default actions of two events.
When I press "enter" one action occurs, when I press "shift-enter" another. I need to switch it. I means if I press "enter" than "shift-enter" action occurs. I tried something like this but if doesn't work.
f(evt.keyCode == 13) {
if(!evt.shiftKey){
evt.preventDefault();
...
How can I open up a map marker info window from a link outside of the map?
I've figured out how to open up the info window by clicking on the marker within the map with the following code:
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml("<div>I'm a marker</div>");
});
However, I cannot figure out how ...
Hi all,
is it possible to set color for geomap?
Also I would like to listen community opinion about alternatives in Geo Coding solutions.
Thanks.
...